示例#1
0
文件: Program.cs 项目: radtek/NZBDash
 private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     Logger = ServiceKernel.GetKernel().Get <ILogger>();
     Logger.Fatal(e.ExceptionObject as Exception);
     if (e.IsTerminating)
     {
         Logger.Info("Application is terminating due to an unhandled exception");
     }
 }
示例#2
0
文件: Program.cs 项目: radtek/NZBDash
        private static void Setup()
        {
            var k = ServiceKernel.GetKernel();

            Logger = k.Get <ILogger>();
            var setup = k.Get <ISetup>();

            setup.Start();
            setup.SetupMappers();
        }
示例#3
0
 public void Start()
 {
     TaskManager.UnobservedTaskException += TaskManagerUnobservedTaskException;
     TaskManager.TaskFactory              = new NinjectTaskFactory(ServiceKernel.GetKernel());
     TaskManager.Initialize(new HardwareTaskRegistry());
 }