openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
src/Utility/Polyfill/System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.cs
15lines · modecode
| 1 | #if !NET7_0_OR_GREATER |
| 2 | |
| 3 | namespace System.Runtime.CompilerServices; |
| 4 | |
| 5 | [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] |
| 6 | internal sealed class CompilerFeatureRequiredAttribute(string featureName) : Attribute |
| 7 | { |
| 8 | public string FeatureName { get; } = featureName; |
| 9 | public bool IsOptional { get; set; } |
| 10 | |
| 11 | public const string RefStructs = nameof(RefStructs); |
| 12 | public const string RequiredMembers = nameof(RequiredMembers); |
| 13 | } |
| 14 | |
| 15 | #endif // !NET7_0_OR_GREATER |
| 16 | |