You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/NzbDrone.Host/Bootstrap.cs

35 lines
1004 B

using System.Reflection;
using NzbDrone.Common.Composition;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Instrumentation;
using NzbDrone.Common.Security;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Host
{
public static class Bootstrap
{
public static IContainer Start(StartupArguments args, IUserAlert userAlert)
{
var logger = NzbDroneLogger.GetLogger();
GlobalExceptionHandlers.Register();
IgnoreCertErrorPolicy.Register();
logger.Info("Starting NzbDrone Console. Version {0}", Assembly.GetExecutingAssembly().GetName().Version);
12 years ago
if (!PlatformValidation.IsValidate(userAlert))
{
throw new TerminateApplicationException();
}
var container = MainAppContainerBuilder.BuildContainer(args);
DbFactory.RegisterDatabase(container);
container.Resolve<Router>().Route();
return container;
}
}
}