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
2017-01-04 14:18:37 -08:00

35 lines
1.1 KiB
C#

using System.Collections.Generic;
using Nancy.Bootstrapper;
using NzbDrone.Api;
using NzbDrone.Common.Composition;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Http.Dispatchers;
using NzbDrone.SignalR;
namespace NzbDrone.Host
{
public class MainAppContainerBuilder : ContainerBuilderBase
{
public static IContainer BuildContainer(StartupContext args)
{
var assemblies = new List<string>
{
"NzbDrone.Host",
"NzbDrone.Core",
"NzbDrone.Api",
"NzbDrone.SignalR"
};
return new MainAppContainerBuilder(args, assemblies).Container;
}
private MainAppContainerBuilder(StartupContext args, List<string> assemblies)
: base(args, assemblies)
{
AutoRegisterImplementations<NzbDronePersistentConnection>();
Container.Register<INancyBootstrapper, NancyBootstrapper>();
Container.Register<IHttpDispatcher, FallbackHttpDispatcher>();
}
}
}