gyhlw_dotnet/网站项目/VRS/Util/InterceptAttribute.cs

22 lines
603 B
C#

using System;
namespace VRS
{
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class InterceptAttribute : Attribute
{
public InterceptAttribute()
{
Console.WriteLine($"{this.GetType().Name} 无参数构造函数执行");
}
public InterceptAttribute(int id)
{
Console.WriteLine($"{this.GetType().Name} int参数构造函数执行");
}
public InterceptAttribute(string name)
{
Console.WriteLine($"{this.GetType().Name} string参数构造函数执行");
}
}
}