2013-08-28 15:08:01 -07:00
|
|
|
using System;
|
|
|
|
using Nancy.Bootstrapper;
|
2013-04-19 17:05:48 -07:00
|
|
|
using NzbDrone.Api;
|
2013-05-05 14:24:33 -07:00
|
|
|
using NzbDrone.Api.SignalR;
|
2013-05-10 16:53:50 -07:00
|
|
|
using NzbDrone.Common.Composition;
|
2013-07-08 17:47:09 -07:00
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
2013-04-19 17:05:48 -07:00
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
using NzbDrone.Core.Organizer;
|
|
|
|
using NzbDrone.Core.RootFolders;
|
2013-08-28 15:08:01 -07:00
|
|
|
using NzbDrone.Host.Owin;
|
2013-04-19 17:05:48 -07:00
|
|
|
|
2013-08-06 22:32:22 -07:00
|
|
|
namespace NzbDrone.Host
|
2013-04-19 17:05:48 -07:00
|
|
|
{
|
|
|
|
public class MainAppContainerBuilder : ContainerBuilderBase
|
|
|
|
{
|
2013-08-12 22:08:37 -07:00
|
|
|
public static IContainer BuildContainer(StartupArguments args)
|
2013-04-19 17:05:48 -07:00
|
|
|
{
|
2013-07-08 17:47:09 -07:00
|
|
|
return new MainAppContainerBuilder(args).Container;
|
2013-04-19 17:05:48 -07:00
|
|
|
}
|
|
|
|
|
2013-08-12 22:08:37 -07:00
|
|
|
private MainAppContainerBuilder(StartupArguments args)
|
2013-08-15 20:32:23 -07:00
|
|
|
: base(args, "NzbDrone.Host", "NzbDrone.Common", "NzbDrone.Core", "NzbDrone.Api")
|
2013-04-19 17:05:48 -07:00
|
|
|
{
|
2013-08-12 22:08:37 -07:00
|
|
|
|
2013-05-10 16:53:50 -07:00
|
|
|
AutoRegisterImplementations<NzbDronePersistentConnection>();
|
2013-04-19 17:05:48 -07:00
|
|
|
|
2013-05-10 16:53:50 -07:00
|
|
|
Container.Register(typeof(IBasicRepository<RootFolder>), typeof(BasicRepository<RootFolder>));
|
|
|
|
Container.Register(typeof(IBasicRepository<NamingConfig>), typeof(BasicRepository<NamingConfig>));
|
2013-04-19 17:05:48 -07:00
|
|
|
|
2013-05-10 16:53:50 -07:00
|
|
|
Container.Register<INancyBootstrapper, NancyBootstrapper>();
|
2013-07-08 17:47:09 -07:00
|
|
|
}
|
2013-04-19 17:05:48 -07:00
|
|
|
}
|
|
|
|
}
|