Dotfuscator User's Guide
Including Methods

Methods may be included by first selecting the type using the <type> element, then providing a rule for selecting methods to include. Methods may be included by name and attribute specifier (as explained in the type section above), as well as by signature. Allowed attribute specifiers are:

Allowed attribute specifiers are:
Copy Code
abstract
assembly
family
familyorassembly
final
private
public
static
virtual

If the attribute specifier is not set explicitly, then the speclist attribute is not used as a matching criterion.

The following example selects all public instance methods beginning with Set:

All Public Instance Methods Beginning with Set:
Copy Code
<method regex="true" name="Set.*" speclist="+public,-static"/>

Method signatures are specified using the signature attribute. A signature specifies both the return type and the parameter types of the method:

Return Type and Parameter Types of the Method:
Copy Code
signature=""  <!-- empty parameter list -->

signature="string(int,MyClass,MyClass[])"

If the signature is not set explicitly, then the method signature is not used as a matching criterion.

The following example selects a method by signature:

Select Method by Signature:
Copy Code
<method name="DoIt" signature="string(int, System.Console, System.Collection.ICollection, float[])"/>

Global methods may be specified by using a special type selector with the name Module:mod_name where mod_name is the name of the module containing the global method.

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com