Add SupportedOSPlatformGuard, UnsupportedOSPlatformGuard attributes#52028
Merged
buyaa-n merged 2 commits intodotnet:mainfrom May 3, 2021
Merged
Add SupportedOSPlatformGuard, UnsupportedOSPlatformGuard attributes#52028buyaa-n merged 2 commits intodotnet:mainfrom
buyaa-n merged 2 commits intodotnet:mainfrom
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. |
buyaa-n
commented
Apr 29, 2021
| 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 |
Contributor
Author
There was a problem hiding this comment.
Seems because of the renaming from MinimumOSPlatformAttribute => SupportedOSPlatformAttribute broke the alphabetical order, moved the API down, Same for RemovedOSPlatformAttribute => UnsupportedOSPlatformAttribute
jeffhandley
approved these changes
Apr 29, 2021
Member
jeffhandley
left a comment
There was a problem hiding this comment.
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 <jeffhandley@users.noreply.github.com>
marek-safar
reviewed
Apr 29, 2021
src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs
Show resolved
Hide resolved
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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