Small tweak in SignalR dependency injection.
This commit is contained in:
parent
c739b3e132
commit
d8957a85ef
|
@ -6,7 +6,6 @@ using DeskMetrics;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common;
|
using NzbDrone.Common;
|
||||||
using NzbDrone.Core.Datastore;
|
|
||||||
using NzbDrone.Core.Instrumentation;
|
using NzbDrone.Core.Instrumentation;
|
||||||
using NzbDrone.Core.Jobs;
|
using NzbDrone.Core.Jobs;
|
||||||
using NzbDrone.Core.Providers;
|
using NzbDrone.Core.Providers;
|
||||||
|
@ -14,6 +13,11 @@ using NzbDrone.Core.Providers.Core;
|
||||||
using NzbDrone.Core.Providers.ExternalNotification;
|
using NzbDrone.Core.Providers.ExternalNotification;
|
||||||
using NzbDrone.Core.Providers.Indexer;
|
using NzbDrone.Core.Providers.Indexer;
|
||||||
using PetaPoco;
|
using PetaPoco;
|
||||||
|
using SignalR;
|
||||||
|
using SignalR.Hosting.AspNet;
|
||||||
|
using SignalR.Infrastructure;
|
||||||
|
using SignalR.Ninject;
|
||||||
|
using Connection = NzbDrone.Core.Datastore.Connection;
|
||||||
|
|
||||||
namespace NzbDrone.Core
|
namespace NzbDrone.Core
|
||||||
{
|
{
|
||||||
|
@ -31,6 +35,9 @@ namespace NzbDrone.Core
|
||||||
logger.Debug("Initializing Kernel:");
|
logger.Debug("Initializing Kernel:");
|
||||||
Kernel = new StandardKernel();
|
Kernel = new StandardKernel();
|
||||||
|
|
||||||
|
var resolver = new NinjectDependencyResolver(Kernel);
|
||||||
|
AspNetHost.SetResolver(resolver);
|
||||||
|
|
||||||
InitDatabase();
|
InitDatabase();
|
||||||
InitReporting();
|
InitReporting();
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Providers
|
||||||
GetClients().updatedStatus(episodeId, episodeStatus.ToString());
|
GetClients().updatedStatus(episodeId, episodeStatus.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static dynamic GetClients()
|
private dynamic GetClients()
|
||||||
{
|
{
|
||||||
var connectionManager = AspNetHost.DependencyResolver.Resolve<IConnectionManager>();
|
var connectionManager = AspNetHost.DependencyResolver.Resolve<IConnectionManager>();
|
||||||
return connectionManager.GetClients<SignalRProvider>();
|
return connectionManager.GetClients<SignalRProvider>();
|
||||||
|
|
Loading…
Reference in New Issue