mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 15:26:34 +01:00
isolated sqlite dependancy
This commit is contained in:
@@ -116,7 +116,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// <param name="newVersion">The new version.</param>
|
||||
public void OnApplicationUpdated(Version newVersion)
|
||||
{
|
||||
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> {Argument = newVersion});
|
||||
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> { Argument = newVersion });
|
||||
|
||||
NotifyPendingRestart();
|
||||
}
|
||||
@@ -258,7 +258,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// <value>The rest services.</value>
|
||||
[ImportMany(typeof(IRestfulService))]
|
||||
public IEnumerable<IRestfulService> RestServices { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The _protobuf serializer initialized
|
||||
/// </summary>
|
||||
@@ -348,14 +348,20 @@ namespace MediaBrowser.Common.Kernel
|
||||
public Assembly[] Assemblies { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Kernel
|
||||
/// Initializes a new instance of the <see cref="BaseKernel{TApplicationPathsType}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="isoManager">The iso manager.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public async Task Init(IIsoManager isoManager)
|
||||
protected BaseKernel(IIsoManager isoManager)
|
||||
{
|
||||
IsoManager = isoManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Kernel
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
public async Task Init()
|
||||
{
|
||||
Logger = Logging.LogManager.GetLogger(GetType().Name);
|
||||
|
||||
ApplicationPaths = new TApplicationPathsType();
|
||||
@@ -539,10 +545,10 @@ namespace MediaBrowser.Common.Kernel
|
||||
{
|
||||
yield return pluginAssembly;
|
||||
}
|
||||
|
||||
|
||||
// Include composable parts in the Model assembly
|
||||
yield return typeof (SystemInfo).Assembly;
|
||||
|
||||
yield return typeof(SystemInfo).Assembly;
|
||||
|
||||
// Include composable parts in the Common assembly
|
||||
yield return Assembly.GetExecutingAssembly();
|
||||
|
||||
@@ -636,7 +642,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
IsoManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Disposes the TCP manager.
|
||||
/// </summary>
|
||||
@@ -760,7 +766,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// The _save lock
|
||||
/// </summary>
|
||||
private readonly object _configurationSaveLock = new object();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Saves the current configuration
|
||||
/// </summary>
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// Inits this instance.
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
Task Init(IIsoManager isoManager);
|
||||
Task Init();
|
||||
|
||||
/// <summary>
|
||||
/// Reloads this instance.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.Logging;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Model.Logging;
|
||||
@@ -9,7 +8,6 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Deployment.Application;
|
||||
using System.Net.Cache;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -83,13 +81,6 @@ namespace MediaBrowser.Common.UI
|
||||
/// <value>The logger.</value>
|
||||
protected ILogger Logger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates the iso manager.
|
||||
/// </summary>
|
||||
/// <param name="kernel">The kernel.</param>
|
||||
/// <returns>IIsoManager.</returns>
|
||||
protected abstract IIsoManager InstantiateIsoManager(IKernel kernel);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseApplication" /> class.
|
||||
/// </summary>
|
||||
@@ -176,7 +167,7 @@ namespace MediaBrowser.Common.UI
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
|
||||
await Kernel.Init(InstantiateIsoManager(Kernel));
|
||||
await Kernel.Init();
|
||||
|
||||
var done = (DateTime.UtcNow - now);
|
||||
Logger.Info("Kernel.Init completed in {0}{1} minutes and {2} seconds.", done.Hours > 0 ? done.Hours + " Hours " : "", done.Minutes, done.Seconds);
|
||||
|
||||
Reference in New Issue
Block a user