I have a facility which needs to register an interceptor and then register this interceptor against a subset of the components already registerd in the container Castle Kernel.
The facility lives in a separatee assembly and it is meant to be used from different assemblies so I cannot couple the interceptor registration with the component registration of each assembly that uses this facility.
Is it possible to do this? How can I achieve this functionality?
Normally the way I use facilities is like this:
The facilities usually either subscribe to container events, register some of their own components, or add
ComponentModel
construction contributors that examine and augmentComponentModel
of components being registered.That way it can be completely transparent to components and imposes to explicit coupling between components and facility (unless you want it).