Example #1
0
        /// <inheritdoc />
        /// <summary>
        /// Hook for processing the end of the application's lifecycle to tear down required state
        /// </summary>
        /// <param name="args">Arguments providing additional information about the closing of the application</param>
        protected override void OnExit(ExitEventArgs args)
        {
            _viewModel?.Dispose();
            _viewModel = null;

            if (!LoggingUtilities.ShutdownLogger())
            {
                DoShutdown(ResultCode.LoggerFailure);
                return;
            }

            base.OnExit(args);
        }