using Umbraco.Core.Configuration;
namespace Umbraco.Configuration
{
///
/// Provides extensions for the enumeration.
///
public static class ModelsModeExtensions
{
///
/// Gets a value indicating whether the mode is LiveAnything or PureLive.
///
public static bool IsLive(this ModelsMode modelsMode)
=> modelsMode == ModelsMode.PureLive || modelsMode == ModelsMode.LiveAppData;
///
/// Gets a value indicating whether the mode is LiveAnything but not PureLive.
///
public static bool IsLiveNotPure(this ModelsMode modelsMode)
=> modelsMode == ModelsMode.LiveAppData;
///
/// Gets a value indicating whether the mode supports explicit generation (as opposed to pure live).
///
public static bool SupportsExplicitGeneration(this ModelsMode modelsMode)
=> modelsMode == ModelsMode.AppData || modelsMode == ModelsMode.LiveAppData;
}
}