Exemplo n.º 1
0
        public void Dispose()
        {
            var modules = _exportProvider.GetExports <IModule>();

            foreach (var lazyModule in modules)
            {
                lazyModule.Value.Dispose();
            }

            _bootstrapper.Dispose();
        }
 /// <summary>
 /// End task
 /// </summary>
 public static void End()
 {
     if (Bootstrapper != null)
     {
         var Logger = Utilities.IO.Log.Get();
         if (Logger != null)
         {
             Logger.LogMessage("Application ending", MessageType.Info);
             Logger.LogMessage("Starting end tasks", MessageType.Info);
         }
         Bootstrapper.Resolve <TaskManager>().Run(RunTime.End);
         Bootstrapper.Dispose();
         Bootstrapper = null;
     }
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     if (_disposed)
     {
         return;
     }
     lock (_syncObject)
     {
         if (_disposed)
         {
             return;
         }
         _disposed = true;
         _bootstrapper?.Dispose();
         _context.Dispose();
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Called at the end of the application
 /// </summary>
 public static void End()
 {
     if (Bootstrapper != null)
     {
         LogBase Logger = Bootstrapper.Resolve <LogBase>(new NullLogger());
         if (Logger != null)
         {
             Logger.LogMessage("Application ending", MessageType.Info);
             Logger.LogMessage("Starting end tasks", MessageType.Info);
         }
         Bootstrapper.Resolve <TaskManager>().Run(RunTime.End);
         if (Logger != null)
         {
             Logger.Dispose();
             Logger = null;
         }
         Bootstrapper.Dispose();
         Bootstrapper = null;
     }
 }
Exemplo n.º 5
0
        public void Dispose()
        {
            _appDomain.UnhandledException -= CurrentDomainOnUnhandledException;

            _bootstrapper.Dispose();
        }
Exemplo n.º 6
0
        public void Dispose()
        {
            TaskScheduler.UnobservedTaskException -= TaskSchedulerOnUnobservedTaskException;

            _bootstrapper.Dispose();
        }
        public void Dispose()
        {
            _application.DispatcherUnhandledException -= CurrentOnDispatcherUnhandledException;

            _bootstrapper.Dispose();
        }
Exemplo n.º 8
0
 protected override void OnExit(ExitEventArgs e)
 {
     _bootstrapper.Dispose();
 }