Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# PostSharp属性未继承_C#_Postsharp_Aop - Fatal编程技术网

C# PostSharp属性未继承

C# PostSharp属性未继承,c#,postsharp,aop,C#,Postsharp,Aop,我在PostSharp中创建了一个类型级方面,它添加了一些方法预处理。我已经把它应用到课堂上了,它就像广告上说的那样有效。然而,在从该类派生的类中,它没有-方法入口代码没有命中 请问,如何使我的方面可继承 我已尝试将[AttributeUsage(AttributeTargets.Class,Inherited=true)]添加到aspect类-无效。您需要设置AttributeInheritance=MulticastHeritance.Multicast 请阅读文档中的更多信息 您需要设置A

我在PostSharp中创建了一个类型级方面,它添加了一些方法预处理。我已经把它应用到课堂上了,它就像广告上说的那样有效。然而,在从该类派生的类中,它没有-方法入口代码没有命中

请问,如何使我的方面可继承


我已尝试将
[AttributeUsage(AttributeTargets.Class,Inherited=true)]
添加到aspect类-无效。

您需要设置AttributeInheritance=MulticastHeritance.Multicast

请阅读文档中的更多信息


您需要设置AttributeInheritance=MulticastHeritance.Multicast

请阅读文档中的更多信息