public static Dictionary <string, Dictionary <string, Dictionary <string, IConfig> > > ToNamedDictionary(this IKeyedServiceProvider keyedServiceProvider) => keyedServiceProvider.GetRequiredService <IEnumerable <IConfig> >() .ToDictionary(sectionKvp => sectionKvp.Key, sectionKvp => sectionKvp.Value .ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToDictionary(c => c.GetType().FullName, c => c)));
public GreetingsController(IServiceProvider serviceProvider, IKeyedServiceProvider <IGreeter, Language> greeterProvider) { _serviceProvider = serviceProvider; _greeterProvider = greeterProvider; }
public Qux(IKeyedServiceProvider <IContract, string> implProvider) { _implProvider = implProvider; }