Skip to content

Commit

Permalink
Rename ObsoletedInOSPlatform attribute (#73600)
Browse files Browse the repository at this point in the history
  • Loading branch information
buyaa-n authored Aug 9, 2022
1 parent b947dd6 commit e117479
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
<type fullname="System.Runtime.Versioning.UnsupportedOSPlatformAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="System.Runtime.Versioning.ObsoletedInOSPlatformAttribute">
<type fullname="System.Runtime.Versioning.ObsoletedOSPlatformAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="System.Runtime.Versioning.RequiresPreviewFeaturesAttribute">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ public UnsupportedOSPlatformAttribute(string platformName, string? message) : ba
#else
internal
#endif
sealed class ObsoletedInOSPlatformAttribute : OSPlatformAttribute
sealed class ObsoletedOSPlatformAttribute : OSPlatformAttribute
{
public ObsoletedInOSPlatformAttribute(string platformName) : base(platformName)
public ObsoletedOSPlatformAttribute(string platformName) : base(platformName)
{
}
public ObsoletedInOSPlatformAttribute(string platformName, string? message) : base(platformName)
public ObsoletedOSPlatformAttribute(string platformName, string? message) : base(platformName)
{
Message = message;
}
Expand Down
6 changes: 3 additions & 3 deletions src/libraries/System.Runtime/ref/System.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13366,10 +13366,10 @@ public FrameworkName(string identifier, System.Version version, string? profile)
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 partial class ObsoletedInOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute
public sealed partial class ObsoletedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute
{
public ObsoletedInOSPlatformAttribute(string platformName) : base(platformName) { }
public ObsoletedInOSPlatformAttribute(string platformName, string? message) : base(platformName) { }
public ObsoletedOSPlatformAttribute(string platformName) : base(platformName) { }
public ObsoletedOSPlatformAttribute(string platformName, string? message) : base(platformName) { }
public string? Message { get { throw null; } }
public string? Url { get { throw null; } set {} }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public void TestSupportedOSPlatformAttribute(string platformName)
[InlineData("Windows8.0")]
[InlineData("Android4.1")]
[InlineData("")]
public void TestObsoletedInOSPlatformAttribute(string platformName)
public void TestObsoletedOSPlatformAttribute(string platformName)
{
var tpa = new ObsoletedInOSPlatformAttribute(platformName);
var tpa = new ObsoletedOSPlatformAttribute(platformName);

Assert.Equal(platformName, tpa.PlatformName);
}
Expand All @@ -69,9 +69,9 @@ public void TestObsoletedInOSPlatformAttribute(string platformName)
[InlineData("Windows8.0", "Message in a bottle")]
[InlineData("Android4.1", "Message on a pigeon")]
[InlineData("", null)]
public void TestObsoletedInOSPlatformAttributeWithMessage(string platformName, string? message)
public void TestObsoletedOSPlatformAttributeWithMessage(string platformName, string? message)
{
var tpa = new ObsoletedInOSPlatformAttribute(platformName, message);
var tpa = new ObsoletedOSPlatformAttribute(platformName, message);

Assert.Equal(platformName, tpa.PlatformName);
Assert.Equal(message, tpa.Message);
Expand Down

0 comments on commit e117479

Please sign in to comment.