Class RuntimeOptions
Provides static options for the runtime.
Inheritance
Namespace: Umbraco.Core
Assembly: Umbraco.Core.dll
Syntax
public static class RuntimeOptions
Remarks
These options can be configured in PreApplicationStart or via appSettings.
Properties
View SourceInstallEmptyDatabase
Declaration
[Obsolete("This setting is no longer used and will be removed in future versions. If a database connection string is configured and the database is empty Umbraco will be installed during the installation sequence.")]
public static bool InstallEmptyDatabase { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
InstallMissingDatabase
Gets a value indicating whether the runtime should enter Install level when the database is missing.
Declaration
public static bool InstallMissingDatabase { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
By default, when a database connection string is configured but it is not possible to connect to the database, the runtime enters the BootFailed level. If this options is set to true, it enters the Install level instead.
It is then up to the implementor, that is setting this value, to take over the installation sequence.
InstallUnattended
Gets a value indicating whether unattended installs are enabled.
Declaration
public static bool InstallUnattended { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
By default, when a database connection string is configured and it is possible to connect to
the database, but the database is empty, the runtime enters the Install
level.
If this option is set to true
an unattended install will be performed and the runtime enters
the Run
level.
UpgradeUnattended
Gets a value indicating whether unattended upgrade is enabled.
Declaration
public static bool UpgradeUnattended { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
View SourceOnRuntimeBoot(Action<IProfilingLogger>)
Registers a RuntimeBoot handler.
Declaration
public static void OnRuntimeBoot(Action<IProfilingLogger> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<IProfilingLogger> | action |
Remarks
A RuntimeBoot handler runs when the runtime boots, right after the loggers have been created, but before anything else.
OnRuntimeEssentials(Action<Composition, AppCaches, TypeLoader, IUmbracoDatabaseFactory>)
Registers a RuntimeEssentials handler.
Declaration
public static void OnRuntimeEssentials(Action<Composition, AppCaches, TypeLoader, IUmbracoDatabaseFactory> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Composition, AppCaches, TypeLoader, IUmbracoDatabaseFactory> | action |
Remarks
A RuntimeEssentials handler runs after the runtime has created a few essential things (AppCaches, a TypeLoader, and a database factory) but before anything else.