2013-09-11 09:33:47 +03:00
|
|
|
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;
|
2013-07-09 03:47:09 +03:00
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
2013-04-20 03:05:48 +03:00
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
using NzbDrone.Core.Organizer;
|
2013-09-11 09:33:47 +03:00
|
|
|
using NzbDrone.SignalR;
|
2013-04-20 03:05:48 +03:00
|
|
|
|
2013-08-07 08:32:22 +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
|
|
|
{
|
2013-07-09 03:47:09 +03:00
|
|
|
return new MainAppContainerBuilder(args).Container;
|
2013-04-20 03:05:48 +03:00
|
|
|
}
|
|
|
|
|
2013-11-26 09:53:36 +03:00
|
|
|
private MainAppContainerBuilder(StartupContext args)
|
2013-09-11 09:33:47 +03:00
|
|
|
: base(args, "NzbDrone.Host", "NzbDrone.Common", "NzbDrone.Core", "NzbDrone.Api", "NzbDrone.SignalR")
|
2013-04-20 03:05:48 +03:00
|
|
|
{
|
2013-08-13 08:08:37 +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<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-07-09 03:47:09 +03:00
|
|
|
}
|
2013-04-20 03:05:48 +03:00
|
|
|
}
|
|
|
|
}
|