private void HandleUnhandledExceptions(BootstrapperConfig bootstrapperConfig)
 {
     AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs args)
     {
         var exception = args.ExceptionObject as Exception;
         if (exception != null)
         {
             bootstrapperConfig.Logger().Fatal(exception);
         }
     };
 }
 private void HandleApplicationShutdown(BootstrapperConfig bootstrapperConfig)
 {
     AppDomain.CurrentDomain.DomainUnload += (sender, args) => AppShutDownHandler.ReportShutDownReason(bootstrapperConfig.Logger());
 }