Carlos Decas
Carlos Decas

Reputation: 13

Postsharp: Method signature for Aspect

Can i specify that an OnMethodInvocationAspect can only be applied to a specific method signature, for exemple "int methodname(ClassA obj)" ?

Upvotes: 1

Views: 178

Answers (1)

Gael Fraiteur
Gael Fraiteur

Reputation: 6857

Yes, by overriding the method CompileTimeValidate and returning false if the MethodBase has not the expected signature.

Upvotes: 1

Related Questions