Unity IOC container and how to resolve different instances of the same interface
问题 I have a unity container that I am registering types within like so: IUnityContainer container = new UnityContainer() .RegisterType<ITaxAuthorityRateService, TaxAuthorityPopulationRateService>( "PopulationRate" ) .RegisterType<ITaxAuthorityRateService, TaxAuthorityBusinessLicenseRateService>( "BusinessLicenseRate" ); Then I also want to register 2 different services that take a ITaxAuthorityRateService variable in their constructor. Both services need a different class that derives from