GetKernel() public static method

public static GetKernel ( ) : IKernel
return IKernel
Esempio 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");
     }
 }
Esempio n. 2
0
        private static void Setup()
        {
            var k = ServiceKernel.GetKernel();

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

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