Extending the Policy Injection Application Block
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. |
You can extend the Policy Injection Application Block through designated extension points. Typically, this requires you to create custom classes that implement a particular interface or derive from an abstract base class. Because these custom classes exist in your application space, you do not have to modify or rebuild the application block; instead, you can designate your extensions through configuration settings.
You can extend the Policy Injection Application Block by doing the following:
- Creating a new matching rule that provides alternative techniques for selecting classes and class members to which the Policy Injection Application Block will attach a handler pipeline.
- Creating new handler that perform the task-specific processing you require for specific method invocations and property accessors.
- Creating new handler attribute that causes the application block to add built-in or custom handlers to the handler pipeline. If you create a custom handler, you may want to create a custom attribute that developers can use to apply your handler by adding the attribute directly to classes or class members within the source code of an application.
If you create a new matching rule or handler, you can add design support so that it is easier for users find and configure. For more details, see Configuration for Custom Matching Rules and Handlers.