mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
43 lines
1.6 KiB
C#
43 lines
1.6 KiB
C#
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();
|
|
}
|
|
}
|
|
} |