Add runtime mode (BackofficeDevelopment, Development and Production) (#12631)
* Add runtime mode setting * Only enable Razor runtime compilation in development modes * Only enable ModelsBuilder generation in development modes * Fix disabling ModelsBuilder controllers * Add IRuntimeModeValidationService and IRuntimeModeValidator * Add JITOptimizerValidator * Add UmbracoApplicationUrlValidator * Add UseHttpsValidator * Add RuntimeMinificationValidator * Add ModelsBuilderModeValidator * Remove .NET 6 preview 1 fix for Razor runtime compilation * Only allow InMemoryAuto in backoffice development mode * Make runtime mode validators public, so they can be easily removed if required * Add comment to highlight removing RazorCompileOnBuild, RazorCompileOnPublish and CopyRazorGenerateFilesToPublishDirectory when using ModelsMode InMemoryAuto * Add documentation * Update src/Umbraco.Web.Common/ModelsBuilder/NoopModelsBuilderDashboardProvider.cs Co-authored-by: Ronald Barendse <ronald@barend.se> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Umbraco.Cms.Core.Configuration.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Typed configuration options for runtime settings.
|
||||
/// Typed configuration options for runtime settings.
|
||||
/// </summary>
|
||||
[UmbracoOptions(Constants.Configuration.ConfigRuntime)]
|
||||
public class RuntimeSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the maximum query string length.
|
||||
/// Gets or sets the runtime mode.
|
||||
/// </summary>
|
||||
[DefaultValue(RuntimeMode.BackofficeDevelopment)]
|
||||
public RuntimeMode Mode { get; set; } = RuntimeMode.BackofficeDevelopment;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the maximum query string length.
|
||||
/// </summary>
|
||||
public int? MaxQueryStringLength { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user