1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 00:12:30 +01:00
Sonarr/NzbDrone/MainAppContainerBuilder.cs

38 lines
1.1 KiB
C#
Raw Normal View History

2013-06-28 03:03:04 +02:00
using NLog;
2013-04-20 02:05:48 +02:00
using Nancy.Bootstrapper;
using NzbDrone.Api;
2013-05-05 23:24:33 +02:00
using NzbDrone.Api.SignalR;
2013-05-11 01:53:50 +02:00
using NzbDrone.Common.Composition;
2013-05-21 05:20:29 +02:00
using NzbDrone.Common.Messaging;
2013-04-20 02:05:48 +02:00
using NzbDrone.Core.Datastore;
2013-05-21 05:20:29 +02:00
using NzbDrone.Core.Instrumentation;
2013-04-20 02:05:48 +02:00
using NzbDrone.Core.Organizer;
using NzbDrone.Core.RootFolders;
namespace NzbDrone
{
public class MainAppContainerBuilder : ContainerBuilderBase
{
private static readonly Logger Logger = LogManager.GetLogger("ContainerBuilderBase");
2013-05-11 01:53:50 +02:00
public static IContainer BuildContainer()
2013-04-20 02:05:48 +02:00
{
return new MainAppContainerBuilder().Container;
}
private MainAppContainerBuilder()
: base("NzbDrone", "NzbDrone.Common", "NzbDrone.Core", "NzbDrone.Api")
{
2013-05-11 01:53:50 +02:00
AutoRegisterImplementations<NzbDronePersistentConnection>();
2013-04-20 02:05:48 +02:00
2013-05-11 01:53:50 +02:00
Container.Register(typeof(IBasicRepository<RootFolder>), typeof(BasicRepository<RootFolder>));
Container.Register(typeof(IBasicRepository<NamingConfig>), typeof(BasicRepository<NamingConfig>));
2013-04-20 02:05:48 +02:00
2013-05-11 01:53:50 +02:00
Container.Register<INancyBootstrapper, NancyBootstrapper>();
2013-06-28 03:03:04 +02:00
2013-04-20 02:05:48 +02:00
}
}
}