Ejemplo n.º 1
0
 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");
     }
 }
Ejemplo n.º 2
0
        private static void Setup()
        {
            var k = ServiceKernel.GetKernel();

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

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