Dotfuscator User's Guide
Excluding Methods

Methods may be excluded by first selecting the type using the <type> element, then providing a rule for selecting methods to exclude. Methods may be excluded by name and attribute specifier, 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 will not be used as a matching criterion. The following example selects all public instance methods beginning with Set:

The following example selects 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 Types and Parameter Types
Copy Code
signature=””  <!-- empty signature -->

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

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

The following example selects a method by signature:

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