-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathNullableAttribute.cs
More file actions
38 lines (32 loc) · 1.29 KB
/
Copy pathNullableAttribute.cs
File metadata and controls
38 lines (32 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#if NET6_0
namespace System.Runtime.CompilerServices
{
/// <summary>
/// Reserved for use by a compiler for tracking metadata.
/// This attribute should not be used by developers in source code.
/// </summary>
//[EditorBrowsable(EditorBrowsableState.Never)]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, Inherited = false)]
public sealed class NullableAttribute : Attribute
{
#region Public Fields
/// <summary>Flags specifying metadata related to nullable reference types.</summary>
public readonly byte[] NullableFlags;
#endregion Public Fields
#region Public Constructors
/// <summary>Initializes the attribute.</summary>
/// <param name="value">The flags value.</param>
public NullableAttribute(byte value)
{
NullableFlags = new[] { value };
}
/// <summary>Initializes the attribute.</summary>
/// <param name="value">The flags value.</param>
public NullableAttribute(byte[] value)
{
NullableFlags = value;
}
#endregion Public Constructors
}
}
#endif