mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 15:47:20 +02:00
* Fixed: Raise ApplicationStartupEvent after Owin is running. * Actually inject the container.
This commit is contained in:
parent
cb857934c4
commit
ec3f094d12
3
.gitignore
vendored
3
.gitignore
vendored
@ -150,3 +150,6 @@ Thumbs.db
|
|||||||
# AppVeyor
|
# AppVeyor
|
||||||
/tools-cake/
|
/tools-cake/
|
||||||
/_artifacts/
|
/_artifacts/
|
||||||
|
|
||||||
|
# Cake
|
||||||
|
/tools/Addins/*
|
@ -34,7 +34,6 @@ protected override void ApplicationStartup(TinyIoCContainer container, IPipeline
|
|||||||
RegisterPipelines(pipelines);
|
RegisterPipelines(pipelines);
|
||||||
|
|
||||||
container.Resolve<DatabaseTarget>().Register();
|
container.Resolve<DatabaseTarget>().Register();
|
||||||
container.Resolve<IEventAggregator>().PublishEvent(new ApplicationStartedEvent());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RegisterPipelines(IPipelines pipelines)
|
private void RegisterPipelines(IPipelines pipelines)
|
||||||
@ -56,4 +55,4 @@ protected override TinyIoCContainer GetApplicationContainer()
|
|||||||
|
|
||||||
protected override byte[] FavIcon => null;
|
protected override byte[] FavIcon => null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
using NzbDrone.Common.Composition;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Lifecycle;
|
using NzbDrone.Core.Lifecycle;
|
||||||
@ -22,6 +23,7 @@ public class NzbDroneServiceFactory : ServiceBase, INzbDroneServiceFactory, IHan
|
|||||||
private readonly IHostController _hostController;
|
private readonly IHostController _hostController;
|
||||||
private readonly IStartupContext _startupContext;
|
private readonly IStartupContext _startupContext;
|
||||||
private readonly IBrowserService _browserService;
|
private readonly IBrowserService _browserService;
|
||||||
|
private readonly IContainer _container;
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
public NzbDroneServiceFactory(IConfigFileProvider configFileProvider,
|
public NzbDroneServiceFactory(IConfigFileProvider configFileProvider,
|
||||||
@ -29,6 +31,7 @@ public NzbDroneServiceFactory(IConfigFileProvider configFileProvider,
|
|||||||
IRuntimeInfo runtimeInfo,
|
IRuntimeInfo runtimeInfo,
|
||||||
IStartupContext startupContext,
|
IStartupContext startupContext,
|
||||||
IBrowserService browserService,
|
IBrowserService browserService,
|
||||||
|
IContainer container,
|
||||||
Logger logger)
|
Logger logger)
|
||||||
{
|
{
|
||||||
_configFileProvider = configFileProvider;
|
_configFileProvider = configFileProvider;
|
||||||
@ -36,6 +39,7 @@ public NzbDroneServiceFactory(IConfigFileProvider configFileProvider,
|
|||||||
_runtimeInfo = runtimeInfo;
|
_runtimeInfo = runtimeInfo;
|
||||||
_startupContext = startupContext;
|
_startupContext = startupContext;
|
||||||
_browserService = browserService;
|
_browserService = browserService;
|
||||||
|
_container = container;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +63,8 @@ public void Start()
|
|||||||
{
|
{
|
||||||
_browserService.LaunchWebUI();
|
_browserService.LaunchWebUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_container.Resolve<IEventAggregator>().PublishEvent(new ApplicationStartedEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnStop()
|
protected override void OnStop()
|
||||||
@ -93,4 +99,4 @@ public void Handle(ApplicationShutdownRequested message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user