Created
January 27, 2023 19:28
-
-
Save jnm2/4f711dca321ccc268154f8393d556af8 to your computer and use it in GitHub Desktop.
This file contains 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
#if !NET7_0_OR_GREATER | |
namespace System.Runtime.CompilerServices; | |
#endif | |
#if !NET5_0_OR_GREATER | |
internal static class IsExternalInit { } | |
#endif | |
#if !NET7_0_OR_GREATER | |
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Struct, Inherited = false)] | |
internal sealed class RequiredMemberAttribute : Attribute { } | |
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] | |
internal sealed class CompilerFeatureRequiredAttribute : Attribute | |
{ | |
public CompilerFeatureRequiredAttribute(string featureName) => FeatureName = featureName; | |
public string FeatureName { get; } | |
public bool IsOptional { get; init; } | |
public const string RefStructs = nameof(RefStructs); | |
public const string RequiredMembers = nameof(RequiredMembers); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment