22 lines
603 B
C#
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参数构造函数执行");
|
|
}
|
|
}
|
|
} |