Share via


The Member Name Matching Rule

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The Member Name Matching Rule allows developers, operators, and administrators to select target classes based on the name of the class members (methods or properties), including using wildcard characters for the member name.

The Policy Injection Application Block includes matching rule configuration placeholders that provide backward compatibility. The implementation of matching rules is described by The Member Name Matching Rule in the Unity Application Block documentation.

For more information, see The Member Name Matching Rule in the Unity Application Block documentation.

Configuration Settings of the Member Name Matching Rule

The configuration settings available for the Member Name Matching Rule are a collection of matches, each consisting of two properties:

  • Match (String). This is the name of a method or property of the target object, such as "GetOrderDetails". It can consist of or include the * or ? wildcard characters to select multiple types. You can also use square brackets [ ] to specify a range of characters. The following are some examples:
    • GetOrder*
    • *OrderFunctions
    • OrderProcess??Node
    • Transacted[order]Node
    • *
  • IgnoreCase (Boolean). This specifies whether the match should be carried out on a case-sensitive basis.

The next procedure describes how to configure the Member Name Matching Rule using the Configuration Console or the Visual Studio Configuration Editor.

To configure the Member Name Matching Rule

  1. Right-click the Matching Rules node in the Enterprise Library Configuration Console or Visual Studio Configuration Editor, point to New, and then click Member Name Matching Rule.
  2. In the right pane of the Enterprise Library Configuration Console, or in the Visual Studio Properties window, select the Name property, and then change the default name to the name you want to use for the new matching rule.
  3. Select the Matches property, and then click the ellipsis button (...) to open the Match Collection Editor dialog box.
  4. Click Add and, in the right pane of the dialog box, enter the name of the target member (which can include square brackets, or the * or ? wildcard characters) in the Value property, and then click either True or False in the drop-down list for the IgnoreCase property.
  5. Repeat the previous step to add all the member name matches you require, and then click OK to close the Match Collection Editor dialog box.