2019-06-24 11:58:36 +02:00
|
|
|
|
using Umbraco.Core.Configuration;
|
2019-10-29 00:25:03 +11:00
|
|
|
|
using Umbraco.ModelsBuilder.Embedded.Configuration;
|
2019-06-24 11:58:36 +02:00
|
|
|
|
|
2019-10-29 00:25:03 +11:00
|
|
|
|
namespace Umbraco.ModelsBuilder.Embedded
|
2019-06-24 11:58:36 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2019-10-29 11:01:44 +01:00
|
|
|
|
/// Provides extension methods for the <see cref="Configs"/> class.
|
2019-06-24 11:58:36 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static class ConfigsExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the models builder configuration.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>Getting the models builder configuration freezes its state,
|
|
|
|
|
|
/// and any attempt at modifying the configuration using the Setup method
|
|
|
|
|
|
/// will be ignored.</remarks>
|
2019-10-28 19:08:42 +11:00
|
|
|
|
public static IModelsBuilderConfig ModelsBuilder(this Configs configs)
|
|
|
|
|
|
=> configs.GetConfig<IModelsBuilderConfig>();
|
2019-06-24 11:58:36 +02:00
|
|
|
|
}
|
2019-10-28 19:08:42 +11:00
|
|
|
|
}
|