|Dotfuscator > Configuring Dotfuscator via the GUI > The Rules Editing Interface > Creating Custom Rules > Selecting By Property|
Property rules are qualified by type rules, so they appear in the rules view as children of type nodes. A property rule will select all properties (in all types matched by the parent type rule) that match your criteria. Supported matching criteria include property name and property attributes.
You create a property rule by right clicking on the parent type rule’s node and selecting Add Property, then typing a name in the Name field. The name will be interpreted as a regular expression if the Regular Expression checkbox is checked; otherwise the name will be interpreted literally.
In addition to property name, you can also select based on property attribute specifiers, using the values provided in the Attribute Specifier list box. A ‘-‘ preceding an attribute specifier negates the attribute (i.e. it selects all properties that do not have the specified attribute). You can select multiple attributes from the list; the criteria implied by multiple selections are logically
AND-ed together (that is, the set of selected properties is the intersection of all methods that match each attribute specifier.). For example, you can select properties that are both public and virtual by selecting +public and +virtual from the list.
The attribute specifications are logically
AND-ed with the property’s name and signature list, so if you want to select all properties with a specific set of attributes, you need to provide a regular expression for the property name that selects all properties (i.e. “.*”).
The corresponding property node displayed in the rule editing view has a child element that indicates whether the rule is a regular expression and whether the rule has attribute specifiers. You can preview the items selected by the rule by right clicking on the node and selecting the Preview option from the menu.
In the screen shot, a property rule is defined that selects the names of all public properties (in all types) whose names start with "C".