Extending and Modifying 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.

In its original form, the Policy Injection Application Block works well for typical scenarios such as validating method parameter and property values, checking authorization, applying caching to method return values and property values, logging method and property calls, and handling exceptions. However, there may be times when you have to customize certain behaviors of the Policy Injection Application Block to better suit your application's particular requirements. There are two ways to do this:

  • Extend the application block. You can do this 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.
  • Modify the application block. You can do this by making changes to its source code. This may, or may not, require associated configuration changes. Because you make changes to the source code, you must rebuild the application block before the modifications take effect. You must also be prepared to handle support and versioning issues. To learn more, see Modifying 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.
Show: