Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add rule to seal internal and private types#41457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrennanConroy merged 29 commits intomainfrombrecon/sealed2
May 5, 2022
Merged

Conversation

BrennanConroy
Copy link
Member

EnablingCA1852

This seems like a mostly good change, obviously this first pass will be the worst part, but future work should be simple to react to, the analyzer will just tell you to make your type sealed 😃

Split the changes into commits for each folder in /src, so /SignalR, /Servers, /Components, etc. are all in separated commits.

The one downside is that we like to use "internals visible to" which means some types get flagged by the analyzer to be marked as sealed, but test code inherits from the type, so you need to ignore the warning with:

#pragma warning disableCA1852// Seal internal typesinternalclass MyType#pragma warning restoreCA1852// Seal internal types

WeihanLi reacted with heart emoji
@PilchiePilchie added the area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework labelMay 2, 2022
@BrennanConroy
Copy link
MemberAuthor

Giving other reviewers until EOD Wednesday PST to give any feedback otherwise merging.

@BrennanConroyBrennanConroy merged commit3ea008c intomainMay 5, 2022
@BrennanConroyBrennanConroy deleted the brecon/sealed2 branchMay 5, 2022 16:26
@ghostghost added this to the7.0-preview5 milestoneMay 5, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@TratcherTratcherTratcher approved these changes

@halter73halter73Awaiting requested review from halter73halter73 is a code owner

@JamesNKJamesNKAwaiting requested review from JamesNKJamesNK is a code owner

@javiercnjaviercnAwaiting requested review from javiercn

@captainsafiacaptainsafiaAwaiting requested review from captainsafiacaptainsafia is a code owner

@PilchiePilchieAwaiting requested review from Pilchie

Assignees
No one assigned
Labels
area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Milestone
7.0-preview5
Development

Successfully merging this pull request may close these issues.

3 participants
@BrennanConroy@Tratcher@Pilchie

[8]ページ先頭

©2009-2025 Movatter.jp