diff options
| author | Patrick Barron <barronpm@gmail.com> | 2023-09-22 21:10:49 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2023-09-23 11:57:38 -0400 |
| commit | 493de3297a415061f8d6a69ff9f62261c3159a2a (patch) | |
| tree | 00f1d83732b79bee796440723d5e1f1c9b355ad1 /MediaBrowser.Common/IApplicationHost.cs | |
| parent | 1d8c3e088be75ce02b811afaeea20307df0487be (diff) | |
Use IHostLifetime to handle restarting and shutting down
Diffstat (limited to 'MediaBrowser.Common/IApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Common/IApplicationHost.cs | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs index 96ee701b3..c1ea6e87c 100644 --- a/MediaBrowser.Common/IApplicationHost.cs +++ b/MediaBrowser.Common/IApplicationHost.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; namespace MediaBrowser.Common @@ -42,10 +41,15 @@ namespace MediaBrowser.Common bool HasPendingRestart { get; } /// <summary> - /// Gets a value indicating whether this instance is currently shutting down. + /// Gets or sets a value indicating whether this instance is currently shutting down. /// </summary> /// <value><c>true</c> if this instance is shutting down; otherwise, <c>false</c>.</value> - bool IsShuttingDown { get; } + bool IsShuttingDown { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether the application should restart. + /// </summary> + bool ShouldRestart { get; set; } /// <summary> /// Gets the application version. @@ -88,11 +92,6 @@ namespace MediaBrowser.Common void NotifyPendingRestart(); /// <summary> - /// Restarts this instance. - /// </summary> - void Restart(); - - /// <summary> /// Gets the exports. /// </summary> /// <typeparam name="T">The type.</typeparam> @@ -124,12 +123,6 @@ namespace MediaBrowser.Common T Resolve<T>(); /// <summary> - /// Shuts down. - /// </summary> - /// <returns>A task.</returns> - Task Shutdown(); - - /// <summary> /// Initializes this instance. /// </summary> /// <param name="serviceCollection">Instance of the <see cref="IServiceCollection"/> interface.</param> |
