Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: Represents an Umbraco application lifetime (starting, started, stop

Umbraco application lifetime notifications are published for the starting, started, stopping, and stopped events of the Umbraco runtime. These events implement the `IUmbracoApplicationLifetimeNotification` interface that contains a single `IsRestarting` property.

A Umbraco application is restarted after an install or upgrade has been completed, so you can use this property to prevent running code twice (on initial boot and restart). To prevent running code when the application is in the install or upgrade state, inject an `IRuntimeState` instance in your notification and inspect the `Level` property instead.
An Umbraco application is restarted after an install or upgrade has been completed. You can use this property to prevent running code twice: on initial boot and restart. To prevent running code when the application is in the install or upgrade state, inject an `IRuntimeState` instance in your notification and inspect the `Level` property instead.

## Usage

Expand Down Expand Up @@ -72,7 +72,7 @@ public class UmbracoApplicationNotificationHandler : INotificationHandler<Umbrac
Triggered when the application is starting after all <code>IComponents</code> are initialized but before any incoming requests are accepted.<br />
<ol>
<li>RuntimeLevel: Gets the runtime level.</li>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li>
</ol>
</td>
</tr>
Expand All @@ -87,7 +87,7 @@ public class UmbracoApplicationNotificationHandler : INotificationHandler<Umbrac
<td>
Triggered when the application has fully started and is accepting incoming requests.<br />
<ol>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li>
</ol>
</td>
</tr>
Expand All @@ -102,7 +102,7 @@ public class UmbracoApplicationNotificationHandler : INotificationHandler<Umbrac
<td>
Triggered when the application is performing a graceful shutdown after all <code>IComponents</code> are terminated.<br />
<ol>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li>
</ol>
</td>
</tr>
Expand All @@ -117,7 +117,7 @@ public class UmbracoApplicationNotificationHandler : INotificationHandler<Umbrac
<td>
Triggered when the application has performed a graceful shutdown.<br />
<ol>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li>
<li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li>
</ol>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >-

Umbraco application lifetime notifications are published for the starting, started, stopping, and stopped events of the Umbraco runtime. These events implement the `IUmbracoApplicationLifetimeNotification` interface that contains a single `IsRestarting` property.

A Umbraco application is restarted after an install or upgrade has been completed, so you can use this property to prevent running code twice (on initial boot and restart). To prevent running code when the application is in the install or upgrade state, inject an `IRuntimeState` instance in your notification and inspect the `Level` property instead.
An Umbraco application is restarted after an install or upgrade has been completed. You can use this property to prevent running code twice: on initial boot and restart. To prevent running code when the application is in the install or upgrade state, inject an `IRuntimeState` instance in your notification and inspect the `Level` property instead.

## Usage

Expand Down Expand Up @@ -54,7 +54,7 @@ public class UmbracoApplicationNotificationHandler : INotificationHandler<Umbrac

| Notification | Members | Description |
| -------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| UmbracoApplicationStartingNotification | <ul><li>RuntimeLevel RuntimeLevel</li><li>bool IsRestarting</li></ul> | <p>Triggered when the application is starting after all <code>IComponents</code> are initialized but before any incoming requests are accepted.<br></p><ol><li>RuntimeLevel: Gets the runtime level.</li><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStartedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has fully started and is accepting incoming requests.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppingNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application is performing a graceful shutdown after all <code>IComponents</code> are terminated.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has performed a graceful shutdown.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStartingNotification | <ul><li>RuntimeLevel RuntimeLevel</li><li>bool IsRestarting</li></ul> | <p>Triggered when the application is starting after all <code>IComponents</code> are initialized but before any incoming requests are accepted.<br></p><ol><li>RuntimeLevel: Gets the runtime level.</li><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
| UmbracoApplicationStartedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has fully started and is accepting incoming requests.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppingNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application is performing a graceful shutdown after all <code>IComponents</code> are terminated.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has performed a graceful shutdown.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >-

Umbraco application lifetime notifications are published for the starting, started, stopping, and stopped events of the Umbraco runtime. These events implement the `IUmbracoApplicationLifetimeNotification` interface that contains a single `IsRestarting` property.

A Umbraco application is restarted after an install or upgrade has been completed, so you can use this property to prevent running code twice (on initial boot and restart). To prevent running code when the application is in the install or upgrade state, inject an `IRuntimeState` instance in your notification and inspect the `Level` property instead.
An Umbraco application is restarted after an install or upgrade has been completed. You can use this property to prevent running code twice: on initial boot and restart. To prevent running code when the application is in the install or upgrade state, inject an `IRuntimeState` instance in your notification and inspect the `Level` property instead.

## Usage

Expand Down Expand Up @@ -54,7 +54,7 @@ public class UmbracoApplicationNotificationHandler : INotificationHandler<Umbrac

| Notification | Members | Description |
| -------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| UmbracoApplicationStartingNotification | <ul><li>RuntimeLevel RuntimeLevel</li><li>bool IsRestarting</li></ul> | <p>Triggered when the application is starting after all <code>IComponents</code> are initialized but before any incoming requests are accepted.<br></p><ol><li>RuntimeLevel: Gets the runtime level.</li><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStartedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has fully started and is accepting incoming requests.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppingNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application is performing a graceful shutdown after all <code>IComponents</code> are terminated.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has performed a graceful shutdown.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (e.g. after an install or upgrade).</li></ol> |
| UmbracoApplicationStartingNotification | <ul><li>RuntimeLevel RuntimeLevel</li><li>bool IsRestarting</li></ul> | <p>Triggered when the application is starting after all <code>IComponents</code> are initialized but before any incoming requests are accepted.<br></p><ol><li>RuntimeLevel: Gets the runtime level.</li><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
| UmbracoApplicationStartedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has fully started and is accepting incoming requests.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppingNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application is performing a graceful shutdown after all <code>IComponents</code> are terminated.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |
| UmbracoApplicationStoppedNotification | <ul><li>bool IsRestarting</li></ul> | <p>Triggered when the application has performed a graceful shutdown.<br></p><ol><li>IsRestarting: Gets a value indicating whether Umbraco is restarting (for example after an install or upgrade).</li></ol> |