C#基于属性进行简单的拦截

时间:2019-02-15 19:09:27

标签: c# attributes interception

我想通过示例执行基于Attribute的C#拦截:

[CheckSomething]
public void Test()
{
}

我想通过示例取消方法的执行,我已经尝试通过创建Attribute来尝试,另一个问题是我没有到达Attribute的构造函数中的Console.WriteLine(),有人知道为什么吗?

谢谢

0 个答案:

没有答案
相关问题