ba97598044
- Introduced IUserAgentProvider, instead of using HttpContext directly - Introduced IUmbracoApplicationLifetime, instead of using UmbracoApplication directly - Introduced IMachineKeyConfig instead of using WebConfigurationManager directly - Move information about dbProvider to the SqlSyntax - Moved install steps
39 lines
1.5 KiB
C#
39 lines
1.5 KiB
C#
using System.Configuration;
|
|
using Umbraco.Configuration;
|
|
using Umbraco.Core.Configuration.HealthChecks;
|
|
using Umbraco.Core.Configuration.UmbracoSettings;
|
|
using Umbraco.Core.IO;
|
|
|
|
namespace Umbraco.Core.Configuration
|
|
{
|
|
public class ConfigsFactory : IConfigsFactory
|
|
{
|
|
public IHostingSettings HostingSettings { get; } = new HostingSettings();
|
|
|
|
public ICoreDebug CoreDebug { get; } = new CoreDebug();
|
|
public IMachineKeyConfig MachineKeyConfig { get; } = new MachineKeyConfig();
|
|
|
|
public IUmbracoSettingsSection UmbracoSettings { get; }
|
|
|
|
public Configs Create(IIOHelper ioHelper)
|
|
{
|
|
var configs = new Configs(section => ConfigurationManager.GetSection(section));
|
|
configs.Add<IGlobalSettings>(() => new GlobalSettings(ioHelper));
|
|
configs.Add(() => HostingSettings);
|
|
|
|
configs.Add<IUmbracoSettingsSection>("umbracoConfiguration/settings");
|
|
configs.Add<IHealthChecks>("umbracoConfiguration/HealthChecks");
|
|
|
|
// Password configuration is held within IUmbracoSettingsSection from umbracoConfiguration/settings but we'll add explicitly
|
|
// so it can be independently retrieved in classes that need it.
|
|
configs.AddPasswordConfigurations();
|
|
|
|
configs.Add(() => CoreDebug);
|
|
configs.Add(() => MachineKeyConfig);
|
|
configs.Add<IConnectionStrings>(() => new ConnectionStrings(ioHelper));
|
|
configs.AddCoreConfigs(ioHelper);
|
|
return configs;
|
|
}
|
|
}
|
|
}
|