Dotfuscator User's Guide
Extended Attributes Section

Dotfuscator allows you to tag methods or assemblies with extended attributes without modifying the application source code. Extended attributes can modify existing supported custom attributes in the code, or act as new instances of supported attributes. As it processes and transforms your application, Dotfuscator treats extended attributes the same as their custom attribute counterparts.

Using a <codetransformlist> element, you can also map attributes, even those embedded in code, to a specific supported code transform using extended attributes. This supports attribute overloading, wherein the same set of attributes can drive multiple transforms such as Application Analytics.

Most extended attributes may be set at the method level. To identify the method, its defining type, name, and signature must be specified.

Supported attribute arguments may be specified using a <propertylist> element.

Any attribute listed in the custom attribute reference is a supported attribute.

Supported Attributes
Copy Code
<extattributes>
<extattribute name="PreEmptive.Attributes.FeatureAttribute">
  <codetransformlist>
  <codetransform name="analytics"/>
  </codetransformlist>
  <type name = "MyApplicaton.MainForm">
   <method name="Main" signature="string[]" />
  </type>
  <propertylist>
   <property name="Name" value="Execute"/>
   <property name="ActivationStatusSinkElement" value="field"/>
   <property name="ActivationStatusSinkName" value="activated"/>
  </propertylist>
</extattribute>
</extattributes>

Extended runtime attributes such as ApplicationAttribute, BinaryAttribute, and BusinessAttribute may be set at the assembly level. To identify the assembly, its name must be provided in an assembly element:

Extended Runtime Attributes
Copy Code
<extattributes>
  <extattribute name="PreEmptive.Attributes.ApplicationAttribute">
    <codetransformlist>
      <codetransform name="sosruntime" />
    </codetransformlist>
    <assembly>
      <file dir="${configdir}" name="MyApp.exe" />
    </assembly>
    <propertylist>
      <property name="Version" value="" />
      <property name="Name" value="" />
      <property name="ApplicationType" value="" />
      <property name="Guid" value="00000000-0000-0000-0000-000000000000" />
    </propertylist>
  </extattribute>
</extattributes>
See Also

References

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com