2019-02-14 09:15:47 +01:00
|
|
|
|
using Umbraco.Core.Configuration.UmbracoSettings;
|
2018-07-20 09:49:05 +02:00
|
|
|
|
|
2019-02-14 09:15:47 +01:00
|
|
|
|
namespace Umbraco.Core.Composing.CompositionExtensions
|
2018-07-20 09:49:05 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2019-01-07 10:43:28 +01:00
|
|
|
|
/// Compose configurations.
|
2018-07-20 09:49:05 +02:00
|
|
|
|
/// </summary>
|
2019-02-14 09:15:47 +01:00
|
|
|
|
public static class Configuration
|
2018-07-20 09:49:05 +02:00
|
|
|
|
{
|
2018-11-27 10:37:33 +01:00
|
|
|
|
public static Composition ComposeConfiguration(this Composition composition)
|
2018-07-20 09:49:05 +02:00
|
|
|
|
{
|
2019-01-07 10:43:28 +01:00
|
|
|
|
// common configurations are already registered
|
|
|
|
|
|
// register others
|
|
|
|
|
|
|
2018-12-12 17:49:24 +01:00
|
|
|
|
composition.RegisterUnique(factory => factory.GetInstance<IUmbracoSettingsSection>().Content);
|
|
|
|
|
|
composition.RegisterUnique(factory => factory.GetInstance<IUmbracoSettingsSection>().RequestHandler);
|
2018-12-17 18:52:43 +01:00
|
|
|
|
composition.RegisterUnique(factory => factory.GetInstance<IUmbracoSettingsSection>().Security);
|
2018-07-20 09:49:05 +02:00
|
|
|
|
|
2018-11-27 10:37:33 +01:00
|
|
|
|
return composition;
|
2018-07-20 09:49:05 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|