Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename MinimumOSPlatformAttribute and RemovedInOSPlatformAttribute #40360

Closed
terrajobst opened this issue Aug 5, 2020 · 2 comments · Fixed by #40371
Closed

Rename MinimumOSPlatformAttribute and RemovedInOSPlatformAttribute #40360

terrajobst opened this issue Aug 5, 2020 · 2 comments · Fixed by #40371
Assignees
Milestone

Comments

@terrajobst
Copy link
Contributor

terrajobst commented Aug 5, 2020

In #39989 (comment) we decided to rename these attributes in order to unify platform-specific attribution with marking platforms as unsupported. Please coordinate this change with @wli3 because he'll have to submit a follow up to his PR.

 namespace System.Runtime.Versioning
 {
     public abstract class OSPlatformAttribute : Attribute
     {
         private protected OSPlatformAttribute(string platformName);
         public string PlatformName { get; }
     }
 
     [AttributeUsage(AttributeTargets.Assembly,
                     AllowMultiple=false, Inherited=false)]
     public sealed class TargetPlatformAttribute : OSPlatformAttribute
     {
         public TargetPlatformAttribute(string platformName);
     }
 
     [AttributeUsage(AttributeTargets.Assembly |
                     AttributeTargets.Class |
                     AttributeTargets.Constructor |
                     AttributeTargets.Enum |
                     AttributeTargets.Event |
                     AttributeTargets.Field |
                     AttributeTargets.Method |
                     AttributeTargets.Module |
                     AttributeTargets.Property |
                     AttributeTargets.Struct,
                     AllowMultiple=true, Inherited=false)]
-    public sealed class MinimumOSPlatformAttribute : OSPlatformAttribute
+    public sealed class SupportedOSPlatformAttribute : OSPlatformAttribute
     {
-        public MinimumOSPlatformAttribute(string platformName);
+        public SupportedOSPlatformAttribute(string platformName);
     }
 
     [AttributeUsage(AttributeTargets.Assembly |
                     AttributeTargets.Class |
                     AttributeTargets.Constructor |
                     AttributeTargets.Enum |
                     AttributeTargets.Event |
                     AttributeTargets.Field |
                     AttributeTargets.Method |
                     AttributeTargets.Module |
                     AttributeTargets.Property |
                     AttributeTargets.Struct,
                     AllowMultiple=true, Inherited=false)]
-    public sealed class RemovedInOSPlatformAttribute : OSPlatformAttribute
+    public sealed class UnsupportedOSPlatformAttribute : OSPlatformAttribute
     {
-        public RemovedInOSPlatformAttribute(string platformName);
+        public UnsupportedOSPlatformAttribute(string platformName);
     }
 
     [AttributeUsage(AttributeTargets.Assembly |
                     AttributeTargets.Class |
                     AttributeTargets.Constructor |
                     AttributeTargets.Enum |
                     AttributeTargets.Event |
                     AttributeTargets.Field |
                     AttributeTargets.Method |
                     AttributeTargets.Module |
                     AttributeTargets.Property |
                     AttributeTargets.Struct,
                     AllowMultiple=true, Inherited=false)]
     public sealed class ObsoletedInOSPlatformAttribute : OSPlatformAttribute
     {
         public ObsoletedInOSPlatformAttribute(string platformName);
         public ObsoletedInOSPlatformAttribute(string platformName, string message);
         public string? Message { get; }
         public string? Url { get; set; }
     }
 }
@terrajobst terrajobst added this to the 5.0.0 milestone Aug 5, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Aug 5, 2020
@terrajobst terrajobst removed the untriaged New issue has not been triaged by the area owner label Aug 5, 2020
@adamsitnik
Copy link
Member

PRs: #40371 and dotnet/sdk#12775

@jeffhandley
Copy link
Member

Breaking change document issue filed at dotnet/docs#20635

@jeffhandley jeffhandley removed the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Sep 14, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants