using Umbraco.Cms.Core.Configuration;
namespace Umbraco.Extensions;
///
/// Provides extensions for the enumeration.
///
public static class ModelsModeExtensions
{
///
/// Gets a value indicating whether the mode is *Auto.
///
public static bool IsAuto(this ModelsMode modelsMode)
=> modelsMode == ModelsMode.InMemoryAuto || modelsMode == ModelsMode.SourceCodeAuto;
///
/// Gets a value indicating whether the mode is *Auto but not InMemory.
///
public static bool IsAutoNotInMemory(this ModelsMode modelsMode)
=> modelsMode == ModelsMode.SourceCodeAuto;
///
/// Gets a value indicating whether the mode supports explicit manual generation.
///
public static bool SupportsExplicitGeneration(this ModelsMode modelsMode)
=> modelsMode == ModelsMode.SourceCodeManual || modelsMode == ModelsMode.SourceCodeAuto;
}