Dotfuscator User's Guide
Selecting By Custom Attribute

Custom attribute rules are qualified by type, method, field, property, or event rules, so they appear in the rules view as children of type, method, field, property, or event nodes. A custom attribute rule will select all items selected by the parent node that are also annotated with a matching custom attribute.

Custom Attribute Name

You create a custom attribute rule by right clicking on the parent type, method, field, property, or event rule’s node and selecting Add Custom Attribute, 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.

Allow Inheritance Checkbox

The Allow Inheritance checkbox controls how the custom attribute rule is applied to inheritance hierarchies. If checked, the rule will additionally exclude overriding methods, properties, events, and sub types.

Custom Attribute Rule Node

The corresponding custom attribute node displayed in the rule editing view has a child element that indicates whether the rule is a regular expression. You can preview the types, methods, fields, properties, or events selected by the rule by right clicking on the node and selecting the Preview option from the menu.

In the screen shot, a custom attribute rule is defined that selects all methods that are annotated with a custom attribute named GettingStarted.TestNamedAttribute.



© 2016 PreEmptive Solutions, LLC. All Rights Reserved.