mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
38 lines
930 B
C#
38 lines
930 B
C#
#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; }
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
|
internal sealed class DoesNotReturnIfAttribute : Attribute
|
|
{
|
|
public DoesNotReturnIfAttribute(bool parameterValue) => ParameterValue = parameterValue;
|
|
|
|
public bool ParameterValue { get; }
|
|
}
|
|
}
|
|
#endif
|