-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SupportedOSPlatformGuard, UnsupportedOSPlatformGuard attributes #52028
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
@@ -10334,21 +10334,11 @@ public sealed partial class FrameworkName : System.IEquatable<System.Runtime.Ver | |||
public static bool operator !=(System.Runtime.Versioning.FrameworkName? left, System.Runtime.Versioning.FrameworkName? right) { throw null; } | |||
public override string ToString() { throw null; } | |||
} | |||
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple = true, Inherited = false)] | |||
public sealed class SupportedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems because of the renaming from MinimumOSPlatformAttribute
=> SupportedOSPlatformAttribute
broke the alphabetical order, moved the API down, Same for RemovedOSPlatformAttribute
=> UnsupportedOSPlatformAttribute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw 1 typo; otherwise looks good to me.
src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs
Outdated
Show resolved
Hide resolved
…ning/PlatformAttributes.cs Co-authored-by: Jeff Handley <[email protected]>
Fixes #51541
Add SupportedOSPlatformGuard and UnsupportedOSPlatformGuard attributes which can be applied to boolean Field, Property or Method and used as a custom guard for platform check functionality in flow analysis of Platform Compatibility Analyzer (CA1416) using.
See more from #51541