MethodBoundaryAspect.Fody icon indicating copy to clipboard operation
MethodBoundaryAspect.Fody copied to clipboard

Apply Aspect globally in AssemblyInfo.cs

Open JamesFlames opened this issue 6 years ago • 3 comments

Is it still possible to apply Aspects globally at assembly level? How is this done? Can wildcards be used to apply Aspects just to a namespace within an assembly?

JamesFlames avatar Oct 22 '18 22:10 JamesFlames

Yes, it is possible, but cannot be restricted to namespaces. It generally applies to all public methods and properties.

@Ralf1108 Could you confirm this information and maybe update the documentation?

marcells avatar Oct 24 '18 22:10 marcells

Just add the following line to set your desired Aspect to be weaved for the whole assembly. You can omit the "Attribute"-Suffix.

[assembly: Log]

Ralf1108 avatar Oct 25 '18 11:10 Ralf1108

To support namespace filters we take a PR ;-)

Ralf1108 avatar Oct 25 '18 11:10 Ralf1108