Skip to content

Commit 8504f29

Browse files
BCSharpslozier
authored andcommitted
Define UnsupportedOSPlatformAttribute
1 parent 26c2dca commit 8504f29

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Src/IronPython/SystemRuntimeVersioning.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// The .NET Foundation licenses this file to you under the Apache 2.0 license.
33
// See the LICENSE file in the project root for more information.
44

5+
#nullable enable
6+
57
namespace System.Runtime.Versioning {
68
#if !FEATURE_OSPLATFORMATTRIBUTE
79
internal abstract class OSPlatformAttribute : Attribute {
@@ -26,5 +28,27 @@ internal sealed class SupportedOSPlatformAttribute : OSPlatformAttribute {
2628
public SupportedOSPlatformAttribute(string platformName) : base(platformName) {
2729
}
2830
}
31+
32+
[AttributeUsage(AttributeTargets.Assembly |
33+
AttributeTargets.Class |
34+
AttributeTargets.Constructor |
35+
AttributeTargets.Enum |
36+
AttributeTargets.Event |
37+
AttributeTargets.Field |
38+
AttributeTargets.Method |
39+
AttributeTargets.Module |
40+
AttributeTargets.Property |
41+
AttributeTargets.Struct,
42+
AllowMultiple = true, Inherited = false)]
43+
internal sealed class UnsupportedOSPlatformAttribute : OSPlatformAttribute {
44+
public UnsupportedOSPlatformAttribute(string platformName) : base(platformName) {
45+
}
46+
47+
public UnsupportedOSPlatformAttribute (string platformName, string? message) : base(platformName) {
48+
Message = message;
49+
}
50+
51+
public string? Message { get; }
52+
}
2953
#endif
3054
}

0 commit comments

Comments
 (0)