skip to the main content area of this page
Patterns and Practices

Effective Policy Viewer for the Policy Injection Application Block


Tom Hollander put together a pet project to help with identifying policies on objects and methods. The Effective Policy Viewer for the Policy Injection Application Block helps identify which policies will apply to which objects and methods.

The Effective Policy Viewer lets you load an assembly, and optionally a configuration file (if you don't select a configuration file it will only look for handlers applied using attributes). The left-hand tree view control will show all of the namespaces, classes and members in the assembly. If a class appears greyed-out, it means that none of the members have policies applied to them. If the class is black, you can expand it to see which members have policies applied to them. Selecting a member will show the list of policies and handlers in the right-hand tree view control. The order that the handlers are listed in the control reflects the order that they will execute at runtime. Keep in mind, however, that policies will only run when objects are created or wrapped using the PolicyInjection class, but this tool can't verify that you're doing this.

Here is a snapshot of the Effective Policy Viewer picking up a CachingCallHandler Attribute on the GetNews Method of the NewsService Class in a sample Web Application Project.

 

Effective Policy Viewer for the Policy Injection Application Block

 

You can download the Effective Policy Viewer for the Policy Injection Application Block here.


Tags: PolicyInjectionApplicationBlock


Topics



Popular Tags



Recent Links