1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Small tweak in SignalR dependency injection.

This commit is contained in:
Mark McDowall 2012-02-12 17:07:09 -08:00
parent c739b3e132
commit d8957a85ef
2 changed files with 9 additions and 2 deletions

View File

@ -6,7 +6,6 @@
using Ninject;
using NLog;
using NzbDrone.Common;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Instrumentation;
using NzbDrone.Core.Jobs;
using NzbDrone.Core.Providers;
@ -14,6 +13,11 @@
using NzbDrone.Core.Providers.ExternalNotification;
using NzbDrone.Core.Providers.Indexer;
using PetaPoco;
using SignalR;
using SignalR.Hosting.AspNet;
using SignalR.Infrastructure;
using SignalR.Ninject;
using Connection = NzbDrone.Core.Datastore.Connection;
namespace NzbDrone.Core
{
@ -31,6 +35,9 @@ public CentralDispatch()
logger.Debug("Initializing Kernel:");
Kernel = new StandardKernel();
var resolver = new NinjectDependencyResolver(Kernel);
AspNetHost.SetResolver(resolver);
InitDatabase();
InitReporting();

View File

@ -22,7 +22,7 @@ public virtual void UpdateEpisodeStatus(int episodeId, EpisodeStatusType episode
GetClients().updatedStatus(episodeId, episodeStatus.ToString());
}
private static dynamic GetClients()
private dynamic GetClients()
{
var connectionManager = AspNetHost.DependencyResolver.Resolve<IConnectionManager>();
return connectionManager.GetClients<SignalRProvider>();