合并
石头 authored at 2024-11-24 11:23:32
511.00 B
X
#if NETFRAMEWORK || NETSTANDARD2_0
namespace System.Diagnostics.CodeAnalysis;

/// <summary>当返回指定值时可能为空</summary>
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
public sealed class MaybeNullWhenAttribute : Attribute
{
    /// <summary>返回值</summary>
    public Boolean ReturnValue { get; }

    /// <summary>实例化</summary>
    /// <param name="returnValue"></param>
    public MaybeNullWhenAttribute(Boolean returnValue) => ReturnValue = returnValue;
}
#endif