Class CoreRuntime
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Runtime
Assembly: Umbraco.Infrastructure.dll
Syntax
public class CoreRuntime : IRuntime
Constructors
View SourceCoreRuntime(IRuntimeState, ILoggerFactory, ComponentCollection, IApplicationShutdownRegistry, IProfilingLogger, IMainDom, IUmbracoDatabaseFactory, IEventAggregator, IHostingEnvironment, IUmbracoVersion, IServiceProvider?, IHostApplicationLifetime?)
Initializes a new instance of the CoreRuntime class.
Declaration
public CoreRuntime(IRuntimeState state, ILoggerFactory loggerFactory, ComponentCollection components, IApplicationShutdownRegistry applicationShutdownRegistry, IProfilingLogger profilingLogger, IMainDom mainDom, IUmbracoDatabaseFactory databaseFactory, IEventAggregator eventAggregator, IHostingEnvironment hostingEnvironment, IUmbracoVersion umbracoVersion, IServiceProvider? serviceProvider, IHostApplicationLifetime? hostApplicationLifetime)
Parameters
| Type | Name | Description |
|---|---|---|
| IRuntimeState | state | |
| ILoggerFactory | loggerFactory | |
| ComponentCollection | components | |
| IApplicationShutdownRegistry | applicationShutdownRegistry | |
| IProfilingLogger | profilingLogger | |
| IMainDom | mainDom | |
| IUmbracoDatabaseFactory | databaseFactory | |
| IEventAggregator | eventAggregator | |
| IHostingEnvironment | hostingEnvironment | |
| IUmbracoVersion | umbracoVersion | |
| IServiceProvider | serviceProvider | |
| IHostApplicationLifetime | hostApplicationLifetime |
Properties
View SourceState
Gets the state of the Umbraco runtime.
Declaration
public IRuntimeState State { get; }
Property Value
| Type | Description |
|---|---|
| IRuntimeState |
Methods
View SourceRestartAsync()
Stops and Starts the runtime using the original cancellation token.
Declaration
public Task RestartAsync()
Returns
| Type | Description |
|---|---|
| Task |
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Indicates that the start process has been aborted. |
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task that represents the asynchronous Start operation. |
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Indicates that the shutdown process should no longer be graceful. |
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task that represents the asynchronous Stop operation. |