GetKernel() public static méthode

public static GetKernel ( ) : IKernel
Résultat IKernel
Exemple #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");
     }
 }
Exemple #2
0
        private static void Setup()
        {
            var k = ServiceKernel.GetKernel();

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

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