-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathPolyfills.cs
More file actions
30 lines (26 loc) · 1000 Bytes
/
Polyfills.cs
File metadata and controls
30 lines (26 loc) · 1000 Bytes
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
#if NETFRAMEWORK
namespace System.Diagnostics.CodeAnalysis;
using static AttributeTargets;
[ExcludeFromCodeCoverage]
[DebuggerNonUserCode]
[AttributeUsage(Parameter | Property | ReturnValue, AllowMultiple = true)]
internal sealed class NotNullIfNotNullAttribute : Attribute
{
/// <summary>
/// Gets the associated parameter name.
/// The output will be non-<see langword="null"/> if the argument to the
/// parameter specified is non-<see langword="null"/>.
/// </summary>
public string ParameterName { get; }
/// <summary>
/// Initializes the attribute with the associated parameter name.
/// </summary>
/// <param name="parameterName">
/// The associated parameter name.
/// The output will be non-<see langword="null"/> if the argument to the
/// parameter specified is non-<see langword="null"/>.
/// </param>
public NotNullIfNotNullAttribute(string parameterName) =>
ParameterName = parameterName;
}
#endif