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

33 lines
1.1 KiB
C#
Raw Normal View History

using System;
using Nancy.Bootstrapper;
2013-04-20 03:05:48 +03:00
using NzbDrone.Api;
2013-05-06 00:24:33 +03:00
using NzbDrone.Api.SignalR;
2013-05-11 02:53:50 +03:00
using NzbDrone.Common.Composition;
using NzbDrone.Common.EnvironmentInfo;
2013-04-20 03:05:48 +03:00
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.RootFolders;
using NzbDrone.Host.Owin;
2013-04-20 03:05:48 +03:00
namespace NzbDrone.Host
2013-04-20 03:05:48 +03:00
{
public class MainAppContainerBuilder : ContainerBuilderBase
{
public static IContainer BuildContainer(StartupArguments args)
2013-04-20 03:05:48 +03:00
{
return new MainAppContainerBuilder(args).Container;
2013-04-20 03:05:48 +03:00
}
private MainAppContainerBuilder(StartupArguments args)
2013-08-16 06:32:23 +03:00
: base(args, "NzbDrone.Host", "NzbDrone.Common", "NzbDrone.Core", "NzbDrone.Api")
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(typeof(IBasicRepository<RootFolder>), typeof(BasicRepository<RootFolder>));
Container.Register(typeof(IBasicRepository<NamingConfig>), typeof(BasicRepository<NamingConfig>));
2013-04-20 03:05:48 +03:00
2013-05-11 02:53:50 +03:00
Container.Register<INancyBootstrapper, NancyBootstrapper>();
}
2013-04-20 03:05:48 +03:00
}
}