I want to feature switch a service implementation. This is easy to do by making Interfaces inherit IDependency and simply marking implementation with:
There are a couple of reasons I can't use IDependency for this:
- I need to inject a named service into my implementations
- Interceptors need to be used with the services
Therefore, the implementations need to have an explicit autofac registration. To feature switch, I need to create 2 autofac registration modules and feature switch them.
My question is: Is this the preferred method? Is there another way that you can suggest to feature switch these autofac registrations?