mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
back to tiny for now
This commit is contained in:
parent
2912561d0e
commit
4deecde092
84 changed files with 617 additions and 558 deletions
|
@ -5,14 +5,14 @@ using Nancy.Diagnostics;
|
|||
using NzbDrone.Api.ErrorManagement;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Api.Frontend;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using TinyIoC;
|
||||
|
||||
namespace NzbDrone.Api
|
||||
{
|
||||
[Singleton]
|
||||
public class NancyBootstrapper : TinyIoCNancyBootstrapper
|
||||
{
|
||||
private readonly TinyIoCContainer _tinyIoCContainer;
|
||||
|
@ -28,18 +28,12 @@ namespace NzbDrone.Api
|
|||
{
|
||||
_logger.Info("Starting NzbDrone API");
|
||||
AutomapperBootstraper.InitializeAutomapper();
|
||||
RegisterReporting(container);
|
||||
|
||||
container.Resolve<IMessageAggregator>().PublishEvent(new ApplicationStartedEvent());
|
||||
|
||||
ApplicationPipelines.OnError.AddItemToEndOfPipeline(container.Resolve<ErrorPipeline>().HandleException);
|
||||
ApplicationPipelines.OnError.AddItemToEndOfPipeline(container.Resolve<NzbDroneErrorPipeline>().HandleException);
|
||||
}
|
||||
|
||||
private void RegisterReporting(TinyIoCContainer container)
|
||||
{
|
||||
EnvironmentProvider.UGuid = container.Resolve<ConfigService>().UGuid;
|
||||
ReportingService.RestProvider = container.Resolve<RestProvider>();
|
||||
}
|
||||
|
||||
protected override TinyIoCContainer GetApplicationContainer()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue