I have some problem with PostSharp (I assume that the problem can be solved by another library). I have a scenario like this:
I should get all classes with a name containing the word, for example "Sth". I have classes in my project (example):
SthClass1.cs
SthClassBlabla.cs
SthClass3.cs
and I find that classes using PostSharp:
[assembly: TraceAttribute( AttributeTargetMembers = "Sth*")]
is it possible to enter (using the aspect, PostSharp (?)) code for each class found?
Example:
SthClass1 myObj = new SthClass1();
myObj.ClassMethod1();
myObj.ClassMethod2();
myObj.InjectedMethod();
source
share