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"); } }
private static void Setup() { var k = ServiceKernel.GetKernel(); Logger = k.Get <ILogger>(); var setup = k.Get <ISetup>(); setup.Start(); setup.SetupMappers(); }
public void Start() { TaskManager.UnobservedTaskException += TaskManagerUnobservedTaskException; TaskManager.TaskFactory = new NinjectTaskFactory(ServiceKernel.GetKernel()); TaskManager.Initialize(new HardwareTaskRegistry()); }