Dotfuscator User's Guide
Including Types

This option includes a type by name or by attribute specifier. You can use a regular expression to specify the type name.

Type names should be fully qualified names.

Inner (nested) classes are specified by using the ‘/’ as a delimiter between outer and inner class. For example:

Inner (Nested) Classes
Copy Code
<type name="Library.Class1/NestedClass"/>

Attribute specifiers are selected or deselected with the speclist attribute. The speclist attribute is a comma-separated list of legal attribute specifiers for types. The legal values are:

Attribute Specifiers:
Copy Code
abstract
interface
nestedassembly
nestedfamily
nestedfamorassem
nestedprivate
nestedpublic
notpublic
public
sealed
serializable
enum

A ‘-‘ preceding an attribute specifier negates the rule (i.e. it includes all classes that do not have the specified attribute). A ‘+’ may be specified but is not required. The rules implied in this list are logically AND-ed together (that is, the set of included types is the intersection of all types that match each rule.). For instance, the following rule includes all methods within any type that is public AND sealed.

Include Method with Public and Sealed Types:
Copy Code
<type name=”.*” speclist=”+public,+sealed” regex=”true”/>

The <type> element may also be used to select a type in order to specify rules for individual method inclusion within it. This allows string encryption in some methods of a type, while not in others. Note the <type> element’s excludetype attribute is not used in the context of string encryption inclusions.

Allow String Encryption in Some Methods of Type:
Copy Code
<type name="MyCo.Test.MyOtherTest">
<!-- individual methods included here -->
...
</type>

If a <type> element contains no nested <method> elements, then all methods are selected for inclusion. This is in contrast to an exclusion rule.

Applies only to Pruning:

Type rules can be applied to entire inheritance hierarchies by specifying the applytoderivedtypes attribute. Setting the value of this attribute to true will apply the type rule and any Method, Field, Property, Event, Custom Attribute, or Supertype rules that it contains to the selected type and all types that derive from it. If not specified, the default value is false, meaning that the type rule will only be applied to the specified type.

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com