made RegisterResources a Task
This commit is contained in:
parent
0268dcec05
commit
46480f1187
|
@ -154,9 +154,7 @@ namespace MediaBrowser.Common.Implementations
|
|||
/// Inits this instance.
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
public virtual Task Init()
|
||||
{
|
||||
return Task.Run(() =>
|
||||
public virtual async Task Init()
|
||||
{
|
||||
IsFirstRun = !ConfigurationManager.CommonConfiguration.IsStartupWizardCompleted;
|
||||
|
||||
|
@ -170,14 +168,13 @@ namespace MediaBrowser.Common.Implementations
|
|||
|
||||
Kernel = GetKernel();
|
||||
|
||||
RegisterResources();
|
||||
await RegisterResources().ConfigureAwait(false);
|
||||
|
||||
FindParts();
|
||||
|
||||
Task.Run(() => ConfigureAutoRunAtStartup());
|
||||
|
||||
Kernel.Init();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -224,7 +221,9 @@ namespace MediaBrowser.Common.Implementations
|
|||
/// <summary>
|
||||
/// Registers resources that classes will depend on
|
||||
/// </summary>
|
||||
protected virtual void RegisterResources()
|
||||
protected virtual Task RegisterResources()
|
||||
{
|
||||
return Task.Run(() =>
|
||||
{
|
||||
RegisterSingleInstance(ConfigurationManager);
|
||||
RegisterSingleInstance<IApplicationHost>(this);
|
||||
|
@ -262,6 +261,7 @@ namespace MediaBrowser.Common.Implementations
|
|||
RegisterSingleInstance(SecurityManager);
|
||||
|
||||
RegisterSingleInstance<IPackageManager>(new PackageManager(SecurityManager, networkManager, httpClient, ApplicationPaths, JsonSerializer, Logger));
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -95,9 +95,9 @@ namespace MediaBrowser.ServerApplication
|
|||
/// <summary>
|
||||
/// Registers resources that classes will depend on
|
||||
/// </summary>
|
||||
protected override void RegisterResources()
|
||||
protected override async Task RegisterResources()
|
||||
{
|
||||
base.RegisterResources();
|
||||
await base.RegisterResources().ConfigureAwait(false);
|
||||
|
||||
RegisterSingleInstance<IServerApplicationPaths>(ApplicationPaths);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common.Internal</id>
|
||||
<version>3.0.30</version>
|
||||
<version>3.0.31</version>
|
||||
<title>MediaBrowser.Common.Internal</title>
|
||||
<authors>Luke</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||
<copyright>Copyright © Media Browser 2013</copyright>
|
||||
<dependencies>
|
||||
<dependency id="MediaBrowser.Common" version="3.0.30" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.31" />
|
||||
<dependency id="NLog" version="2.0.0.2000" />
|
||||
<dependency id="ServiceStack" version="3.9.38" />
|
||||
<dependency id="ServiceStack.Api.Swagger" version="3.9.38" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common</id>
|
||||
<version>3.0.30</version>
|
||||
<version>3.0.31</version>
|
||||
<title>MediaBrowser.Common</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Server.Core</id>
|
||||
<version>3.0.30</version>
|
||||
<version>3.0.31</version>
|
||||
<title>Media Browser.Server.Core</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||
<copyright>Copyright © Media Browser 2013</copyright>
|
||||
<dependencies>
|
||||
<dependency id="MediaBrowser.Common" version="3.0.30" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.31" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
|
Loading…
Reference in New Issue
Block a user