Skip to content

Commit

Permalink
Define UnsupportedOSPlatformAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
BCSharp committed Dec 4, 2024
1 parent 26c2dca commit ef26b27
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Src/IronPython/SystemRuntimeVersioning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 license.
// See the LICENSE file in the project root for more information.

#nullable enable

namespace System.Runtime.Versioning {
#if !FEATURE_OSPLATFORMATTRIBUTE
internal abstract class OSPlatformAttribute : Attribute {
Expand All @@ -26,5 +28,27 @@ internal sealed class SupportedOSPlatformAttribute : OSPlatformAttribute {
public SupportedOSPlatformAttribute(string platformName) : base(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)]
internal sealed class UnsupportedOSPlatformAttribute : OSPlatformAttribute {
public UnsupportedOSPlatformAttribute(string platformName) : base(platformName) {
}

public UnsupportedOSPlatformAttribute (string platformName, string? message) : base(platformName) {
Message = message;
}

public string? Message { get; }
}
#endif
}

0 comments on commit ef26b27

Please sign in to comment.