单元测试去掉net462,xunit对它的支持有些问题,导致测试结束时卡死
石头 authored at 2024-11-24 23:18:00
618.00 B
X
#if NETFRAMEWORK || NETSTANDARD2_0
namespace System.Diagnostics.CodeAnalysis;

/// <summary>指定参数不为空时返回也不为空</summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
public sealed class NotNullIfNotNullAttribute : Attribute
{
    /// <summary>指定参数</summary>
    public String ParameterName { get; }

    /// <summary>实例化</summary>
    /// <param name="parameterName"></param>
    public NotNullIfNotNullAttribute(String parameterName) => ParameterName = parameterName;
}
#endif