/// <summary> /// /// </summary> /// <param name="globalConfig"></param> /// <returns></returns> public override IConfigurationProvider CreateConfigurationProvider(object globalConfig) { CompositeConfigurationProvider output = new CompositeConfigurationProvider(Minesweeper.Core.Configurations.ConfigurationProvider.CreateLocalProvider()); CompositeConfigurationProviderConfiguration config = this; if (config.Providers != null && config.Providers.Count > 0) { foreach (var c in config.Providers) { IConfigurationProvider provider = c.CreateConfigurationProvider(globalConfig); output.AddProvider(provider); } } return(output); }
public virtual IConfigurationProvider Create() { CompositeConfigurationProvider output = new CompositeConfigurationProvider(Minesweeper.Core.Configurations.ConfigurationProvider.CreateLocalProvider()); AppConfigConfigurationProvider local = output.LocalConfigurationProvider as AppConfigConfigurationProvider; string baseDirectory = local.ApplicationPath; CompositeConfigurationProviderConfiguration config = (CompositeConfigurationProviderConfiguration)this.Configuration; if (config != null) { output.BaseDirectory = Path.GetFullPath(baseDirectory); foreach (var c in config.Providers) { output.AddProvider(c.CreateConfigurationProvider(config)); } } return(output); }