Inheritance of the DoNotObfuscate Attribute

Andy_LAndy_L Posts: 2 New member
I have some code similar to this:
[SmartAssembly.Attributes.DoNotObfuscate]public class BaseClass {}
public class DerivedClass : BaseClass {}
When I look at the implementation of the DoNotObfuscateAttribute, I can see its AttributeUsage attribute doesn't specify a value for the Inherited parameter, so uses the default value of true, and the attribute should be inherited by derived classes.
At runtime, if I look at
then sure enough, DerivedClass has the SmartAssembly.Attributes.DoNotObfuscateAttribute attribute.

Yet when I run obfuscation, DerivedClass gets obfuscated while BaseClass doesn't.  Why does DerivedClass get obfuscated when it should inherit the DoNotObfuscateAttribute?

Is there some other way I can tell SmartAssembly not to obfuscate all classes derived from a particular base class?

Sign In or Register to comment.