|
| 1 | +// Copyright Subatomix Research Inc. |
| 2 | +// SPDX-License-Identifier: MIT |
| 3 | + |
| 4 | +#if !NET7_0_OR_GREATER |
| 5 | + |
| 6 | +using System.ComponentModel; |
| 7 | + |
| 8 | +using static System.AttributeTargets; |
| 9 | +using static System.ComponentModel.EditorBrowsableState; |
| 10 | + |
| 11 | +namespace System.Diagnostics.CodeAnalysis |
| 12 | +{ |
| 13 | + [AttributeUsage(Constructor, AllowMultiple = false, Inherited = false)] |
| 14 | + [EditorBrowsable(Never)] |
| 15 | + [ExcludeFromCodeCoverage] |
| 16 | + internal sealed class SetsRequiredMembersAttribute : Attribute {} |
| 17 | +} |
| 18 | + |
| 19 | +namespace System.Runtime.CompilerServices |
| 20 | +{ |
| 21 | + [AttributeUsage(Class | Struct | Field | Property, AllowMultiple = false, Inherited = false)] |
| 22 | + [EditorBrowsable(Never)] |
| 23 | + [ExcludeFromCodeCoverage] |
| 24 | + internal sealed class RequiredMemberAttribute : Attribute {} |
| 25 | + |
| 26 | + [AttributeUsage(All, AllowMultiple = true, Inherited = false)] |
| 27 | + [EditorBrowsable(Never)] |
| 28 | + [ExcludeFromCodeCoverage] |
| 29 | + internal sealed class CompilerFeatureRequiredAttribute : Attribute |
| 30 | + { |
| 31 | + public CompilerFeatureRequiredAttribute(string featureName) |
| 32 | + => FeatureName = featureName; |
| 33 | + |
| 34 | + public string FeatureName { get; } |
| 35 | + public bool IsOptional { get; init; } |
| 36 | + } |
| 37 | +} |
| 38 | + |
| 39 | +#endif |
0 commit comments