Rename models builder modes (#10272)
* Renaming AppData Models Builder mode * Renaming PureLive Models Builder mode to Runtime * ModelsBuilderAssembly attribute flags if models are "Live" or not * Updated ModelsMode names * Only add tag if it is not a pull request. Apparently this is not allowed when it is from a fork. * Revert "Only add tag if it is not a pull request. Apparently this is not allowed when it is from a fork." This reverts commit 92b33f3c Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -8,21 +8,21 @@ namespace Umbraco.Extensions
|
||||
public static class ModelsModeExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the mode is LiveAnything or PureLive.
|
||||
/// Gets a value indicating whether the mode is *Auto.
|
||||
/// </summary>
|
||||
public static bool IsLive(this ModelsMode modelsMode)
|
||||
=> modelsMode == ModelsMode.PureLive || modelsMode == ModelsMode.LiveAppData;
|
||||
public static bool IsAuto(this ModelsMode modelsMode)
|
||||
=> modelsMode == ModelsMode.InMemoryAuto || modelsMode == ModelsMode.SourceCodeAuto;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the mode is LiveAnything but not PureLive.
|
||||
/// Gets a value indicating whether the mode is *Auto but not InMemory.
|
||||
/// </summary>
|
||||
public static bool IsLiveNotPure(this ModelsMode modelsMode)
|
||||
=> modelsMode == ModelsMode.LiveAppData;
|
||||
public static bool IsAutoNotInMemory(this ModelsMode modelsMode)
|
||||
=> modelsMode == ModelsMode.SourceCodeAuto;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the mode supports explicit generation (as opposed to pure live).
|
||||
/// Gets a value indicating whether the mode supports explicit manual generation.
|
||||
/// </summary>
|
||||
public static bool SupportsExplicitGeneration(this ModelsMode modelsMode)
|
||||
=> modelsMode == ModelsMode.AppData || modelsMode == ModelsMode.LiveAppData;
|
||||
=> modelsMode == ModelsMode.SourceCodeManual || modelsMode == ModelsMode.SourceCodeAuto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user