XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.XUnit

【DLL】提供方便快捷的测试,无需编写Main方法,可直接添加特性在类或方法上进行测试

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFEExtension.NetCore.XUnit.Attributes;

/// <summary>
/// 在测试程序集上注册运行时扩展实现。
/// </summary>
/// <param name="extensionType">
/// 实现 <see cref="Runtime.ITestReporter"/>、<see cref="Runtime.IBenchmarkExporter"/>
/// 或 <see cref="Runtime.ITestActivator"/> 的类型。
/// </param>
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class UseExtensionAttribute(Type extensionType) : Attribute
{
    /// <summary>
    /// 获取要由运行器实例化的扩展类型。
    /// </summary>
    public Type ExtensionType { get; } = extensionType;
}