PIAB Custom handler problem

Topics: Building and extending application blocks, Policy Injection Application Block
Feb 29, 2008 at 12:42 PM
Hi everyone,

I have a doubt using the Policy Injection Application Block. I'm building an audit library that is going to be used in other projects. This library doesn't alter the business logic of the other projects' classes, it just leaves an audit trail somewhere (who made what and when).

I've built a custom handler that wraps the calls of the business logic objects, and a factory that returns an auditable object when the trail is on. The handler writes the action, the parameters, etc. without problems. But I'd like to leave in the audit trail some data not present in the method call or the target object (mainly a user name and IP address). I can pass this info to the factory, but I don't know how to pass some extra info to the custom handler.

Has anyone done something like this or know how to solve it?

Thanks in advance
Mar 4, 2008 at 7:00 AM
I've done something very similar that used Call Context / TLS to pass around information that isn't included in method signatures.