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; } }
public void Dispose() { if (_disposed) { return; } lock (_syncObject) { if (_disposed) { return; } _disposed = true; _bootstrapper?.Dispose(); _context.Dispose(); } }
/// <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; } }
public void Dispose() { _appDomain.UnhandledException -= CurrentDomainOnUnhandledException; _bootstrapper.Dispose(); }
public void Dispose() { TaskScheduler.UnobservedTaskException -= TaskSchedulerOnUnobservedTaskException; _bootstrapper.Dispose(); }
public void Dispose() { _application.DispatcherUnhandledException -= CurrentOnDispatcherUnhandledException; _bootstrapper.Dispose(); }
protected override void OnExit(ExitEventArgs e) { _bootstrapper.Dispose(); }