For example I would like to call the following code to register a whole set of services which I want to inject a policy for:
container
.AddNewExtensionIfNotPresent<Interception>().Configure<Interception>().SetDefaultInterceptorFor<IBusinessService>(new InterfaceInterceptor());
Where:
ISomeServiceA : IBusinessService
ISomeServiceB : IBusinessService etc
I think I read that you cant get from ISomeServceX to IMarkerInterface somewhere….
Can this be confirmed.
In short, look at loaded assemblies (add extra filtering if required – no caching if this is done on bootstrap) Add default interceptors for the types implementing the designated marker interface.
EDIT:
The above can be done using the fluent API and means we dont have the naiive dependency on AppDomain.CurrentDomain.GetAssemblies() (which wouldnt contain the filtering applied in the fluent api config