1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/src/NzbDrone.Host/MainAppContainerBuilder.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2016-12-23 23:45:24 +02:00
using System.Collections.Generic;
using Nancy.Bootstrapper;
2013-04-20 03:05:48 +03:00
using NzbDrone.Api;
2013-05-11 02:53:50 +03:00
using NzbDrone.Common.Composition;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Http.Dispatchers;
2013-09-11 09:33:47 +03:00
using NzbDrone.SignalR;
2013-04-20 03:05:48 +03:00
namespace NzbDrone.Host
2013-04-20 03:05:48 +03:00
{
public class MainAppContainerBuilder : ContainerBuilderBase
{
2013-11-26 09:53:36 +03:00
public static IContainer BuildContainer(StartupContext args)
2013-04-20 03:05:48 +03:00
{
var assemblies = new List<string>
{
"NzbDrone.Host",
"NzbDrone.Core",
"NzbDrone.Api",
"NzbDrone.SignalR"
};
return new MainAppContainerBuilder(args, assemblies).Container;
2013-04-20 03:05:48 +03:00
}
private MainAppContainerBuilder(StartupContext args, List<string> assemblies)
: base(args, assemblies)
2013-04-20 03:05:48 +03:00
{
2013-05-11 02:53:50 +03:00
AutoRegisterImplementations<NzbDronePersistentConnection>();
2013-04-20 03:05:48 +03:00
2013-05-11 02:53:50 +03:00
Container.Register<INancyBootstrapper, NancyBootstrapper>();
Container.Register<IHttpDispatcher, FallbackHttpDispatcher>();
}
2013-04-20 03:05:48 +03:00
}
}