private static IConfigurationRepository CreateRepository() { if (NConfigSettings.DetectIsWeb()) { return(new ConfigurationRepositoryWeb()); } return(new ConfigurationRepository()); }
private static INSystemConfigurator CreateSystemConfigurator() { if (NConfigSettings.DetectIsWeb()) { return(new NWebSystemConfigurator()); } return(new NSystemConfigurator()); }
public static IConfigurationService With(Action<INConfigSettings> configureAction) { var settings = new NConfigSettings(); configureAction(settings); IDictionary<string, ISectionProvider> providers = settings.ConfigurationDataProviders.SelectMany(x => x.Get()).ToDictionary(x => x.Key, x => x.Value); return new ConfigurationService(settings.RuntimeContext, providers); }