public FeaturesController(ValuesFeature valuesFeature, NavigationFeature navigationFeature) { _allFeatures = new List <IFeatureToggle>() { valuesFeature, navigationFeature // It would be much nicer if we could inject all registered IFeatureToggle in here, but // it appears to be a restriction of the DI in ASP.NET core when registering a concrete // type. It would avoid having to maintain this list manually. }; }
public void ConfigureServices(HostBuilderContext context, IServiceCollection services) { BasicExampleFeature.RegisterServices(services); ValuesFeature.RegisterServices(services); services.AddSingleton <IFixture, Fixture>(); services.AddSingleton <IApiClientFixture, ApiClientFixture>(); services.AddSingleton <ValuesApiFixture>(); services.AddSingleton <IValuesDataService, ValuesDataServiceFixture>(); }