You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
671 B
29 lines
671 B
#if !NETCORE
|
|
|
|
#nullable enable
|
|
|
|
namespace System.Diagnostics.CodeAnalysis
|
|
{
|
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)]
|
|
internal sealed class NotNullIfNotNullAttribute : Attribute
|
|
{
|
|
public string ParameterName { get; }
|
|
|
|
public NotNullIfNotNullAttribute(string parameterName)
|
|
{
|
|
ParameterName = parameterName;
|
|
}
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
|
internal sealed class NotNullWhenAttribute : Attribute
|
|
{
|
|
public NotNullWhenAttribute(bool returnValue)
|
|
{
|
|
ReturnValue = returnValue;
|
|
}
|
|
|
|
public bool ReturnValue { get; }
|
|
}
|
|
}
|
|
#endif
|