Beispiel #1
0
 public SettingProviderManager(IServiceProvider serviceProvider,
                               IOptions <SettingOptions> options)
 {
     _serviceProvider = serviceProvider;
     _options         = options.Value;
     _providers       = new Lazy <List <ISettingProvider> >(() =>
                                                            _options.SettingProviders.Select(t => _serviceProvider.GetService(t) as ISettingProvider).ToList(), true);
 }
Beispiel #2
0
 public SettingDefinitionManager(IOptions <SettingOptions> options, IServiceProvider serviceProvider)
 {
     _settingDefinitions = new Lazy <IDictionary <string, SettingDefinition> >(CreateSettingDefinitions, true);
     _options            = options.Value;
     _serviceProvider    = serviceProvider;
 }