應用PostSharp方面我要到處運用我VerboseTraceAspect
到我的解決方案,並應用屬性除了通過集信息
- getter和setter方法
- 任何類型的
TestProject.Logging.*
和TestProject.Tracing.*
我我正在使用下面的示例,但似乎沒有工作。我做錯了嗎?如果是這樣,應該怎麼做?
感謝堆。
[assembly: VerboseTraceAspect(AspectPriority = 0, AttributeExclude = true, AttributeTargetTypes = "TestProject.Logging.*|TestProject.Tracing.*")]
[assembly: VerboseTraceAspect(AspectPriority = 1, AttributeExclude = true, AttributeTargetMembers = "regex:get_.*|set_.*")]
[assembly: VerboseTraceAspect(AspectPriority = 2, AttributeTargetTypes = "TestProject.*",
AttributeTargetTypeAttributes = MulticastAttributes.Public,
AttributeTargetMemberAttributes = MulticastAttributes.Public,
AttributeTargetElements = MulticastTargets.Method)]
你能準確地指定似乎沒有什麼工作?該屬性是否完全不適用?它是否適用於任何地方,包括getters,setters,Logging,Tracing? – AlexD