PostSharp, Obfuscation, and IL

added by redgate
6/11/2012 8:54:29 AM

6 Kicks, 278 Views

Normally, attributes in .NET are entirely a metadata construct. Apart from a few special attributes in the .NET framework, they have no effect whatsoever on how a class or method executes within the CLR. Only by using reflection at runtime can you access any attributes declared on a type or type member. PostSharp changes this. Simon Cooper shows why PostSharp breaks obfuscators, and how SmartAssembly now supports the framework.


2 comments

dpeterson
6/11/2012 8:56:32 AM
Interesting little look at PostSharp under the hood. I never really investigated the IL required to do its magic, it seems surprisingly simple (though I'm sure PostSharp is also doing a lot more as well).

timbolt8
6/12/2012 8:35:06 AM
very detailed and well written. I didn't even know obfuscation was a word until i read this!