Unity 1.2 and the Policy Injection Extension

Oct 30, 2008 at 10:08 PM
Does anyone know if it possible to setup the Unity configuration section such that two of the same type mappings differ in what policy is executed?  Therefore if you have:

<type type ="IOrder", mapTo ="NewOrder", "PL" />
type type = "IOrder", mapTo ="NewOrder", "BL" />

"PL" would be wrapped in PI and "BL" wouldn't be wrapped.  Can this be implemented via configuration?

Nov 4, 2008 at 5:55 PM
Would the best approach be to create different matching rules that would call a particular type mapping?  So in the case above, one policy would have a matching rule to be used for the "PL" type mapping?

Nov 7, 2008 at 3:26 AM
I think the matching rules are not responsible in determining the type mapping. The matching rules for the call handlers are applied after the type has been resolved. I am not sure if there is a matching rule that can be used to determine which type mapping was used in the resolution process. A possiblity would be to configure interceptors in one and not on the other. I am not exactly sure how to do this yet or if it is at all possible.