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.
43 lines
1.6 KiB
43 lines
1.6 KiB
using System;
|
|
using System.Reflection;
|
|
using NLog;
|
|
using Ninject;
|
|
using NzbDrone.Providers;
|
|
|
|
namespace NzbDrone
|
|
{
|
|
public static class Program
|
|
{
|
|
public static readonly StandardKernel Kernel = new StandardKernel();
|
|
|
|
private static readonly Logger Logger = LogManager.GetLogger("Host.Main");
|
|
|
|
private static void Main()
|
|
{
|
|
try
|
|
{
|
|
Kernel.Bind<ConfigProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<ConsoleProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<DebuggerProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<EnviromentProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<IISProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<MonitoringProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<ProcessProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<ServiceProvider>().ToSelf().InSingletonScope();
|
|
Kernel.Bind<WebClientProvider>().ToSelf().InSingletonScope();
|
|
|
|
Console.WriteLine("Starting NzbDrone Console. Version " + Assembly.GetExecutingAssembly().GetName().Version);
|
|
Kernel.Get<MonitoringProvider>().Start();
|
|
Kernel.Get<Application>().Start();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine(e.ToString());
|
|
Logger.Fatal(e.ToString());
|
|
}
|
|
|
|
Console.WriteLine("Press enter to exit.");
|
|
Console.ReadLine();
|
|
}
|
|
}
|
|
} |