I am looking to add my aspect to the system.io namespace, I already searches lots of solutions which didn't do the trick but basically I want to handle exceptions and do some logging on the File class from System.IO namespace. Just like adding [MyAspect] to the top of the class..
Is there a way?
Let's consider aspect like this:
You can apply this aspect to any 3rd assembly called from your project by applying
MyAspect
:When you specify this assembly attribute then PostSharp decorates all calls from your project to methods from
System.IO
namespace inmscorlib
assembly withMyAspect
.