aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/IApplicationHost.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common/IApplicationHost.cs')
-rw-r--r--MediaBrowser.Common/IApplicationHost.cs61
1 files changed, 33 insertions, 28 deletions
diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs
index 6668e98aa..0e282cf53 100644
--- a/MediaBrowser.Common/IApplicationHost.cs
+++ b/MediaBrowser.Common/IApplicationHost.cs
@@ -3,16 +3,22 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Updates;
+using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace MediaBrowser.Common
{
/// <summary>
- /// An interface to be implemented by the applications hosting a kernel
+ /// An interface to be implemented by the applications hosting a kernel.
/// </summary>
public interface IApplicationHost
{
/// <summary>
+ /// Occurs when [has pending restart changed].
+ /// </summary>
+ event EventHandler HasPendingRestartChanged;
+
+ /// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
@@ -25,13 +31,13 @@ namespace MediaBrowser.Common
string SystemId { get; }
/// <summary>
- /// Gets or sets a value indicating whether this instance has pending kernel reload.
+ /// Gets a value indicating whether this instance has pending kernel reload.
/// </summary>
/// <value><c>true</c> if this instance has pending kernel reload; otherwise, <c>false</c>.</value>
bool HasPendingRestart { get; }
/// <summary>
- /// Gets or sets a value indicating whether this instance is currently shutting down.
+ /// Gets 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; }
@@ -43,27 +49,12 @@ namespace MediaBrowser.Common
bool CanSelfRestart { get; }
/// <summary>
- /// Get the version class of the system.
+ /// Gets the version class of the system.
/// </summary>
/// <value><see cref="PackageVersionClass.Release" /> or <see cref="PackageVersionClass.Beta" />.</value>
PackageVersionClass SystemUpdateLevel { get; }
/// <summary>
- /// Occurs when [has pending restart changed].
- /// </summary>
- event EventHandler HasPendingRestartChanged;
-
- /// <summary>
- /// Notifies the pending restart.
- /// </summary>
- void NotifyPendingRestart();
-
- /// <summary>
- /// Restarts this instance.
- /// </summary>
- void Restart();
-
- /// <summary>
/// Gets the application version.
/// </summary>
/// <value>The application version.</value>
@@ -88,6 +79,22 @@ namespace MediaBrowser.Common
string ApplicationUserAgentAddress { get; }
/// <summary>
+ /// Gets the plugins.
+ /// </summary>
+ /// <value>The plugins.</value>
+ IReadOnlyList<IPlugin> Plugins { get; }
+
+ /// <summary>
+ /// Notifies the pending restart.
+ /// </summary>
+ void NotifyPendingRestart();
+
+ /// <summary>
+ /// Restarts this instance.
+ /// </summary>
+ void Restart();
+
+ /// <summary>
/// Gets the exports.
/// </summary>
/// <typeparam name="T">The type.</typeparam>
@@ -98,31 +105,29 @@ namespace MediaBrowser.Common
/// <summary>
/// Resolves this instance.
/// </summary>
- /// <typeparam name="T"></typeparam>
+ /// <typeparam name="T">The <c>Type</c>.</typeparam>
/// <returns>``0.</returns>
T Resolve<T>();
/// <summary>
/// Shuts down.
/// </summary>
+ /// <returns>A task.</returns>
Task Shutdown();
/// <summary>
- /// Gets the plugins.
- /// </summary>
- /// <value>The plugins.</value>
- IPlugin[] Plugins { get; }
-
- /// <summary>
/// Removes the plugin.
/// </summary>
/// <param name="plugin">The plugin.</param>
void RemovePlugin(IPlugin plugin);
/// <summary>
- /// Inits this instance.
+ /// Initializes this instance.
/// </summary>
- Task InitAsync(IServiceCollection serviceCollection);
+ /// <param name="serviceCollection">The service collection.</param>
+ /// <param name="startupConfig">The configuration to use for initialization.</param>
+ /// <returns>A task.</returns>
+ Task InitAsync(IServiceCollection serviceCollection, IConfiguration startupConfig);
/// <summary>
/// Creates the instance.