Exemplo n.º 1
0
        public void Shutdown()
        {
            try
            {
                if (_stopCommand.CanExecute(null))
                {
                    _stopCommand.Execute(null);
                }

                Task.WaitAll(_runningTasks.ToArray());
            }
            catch (AggregateException)
            {
            }

            using (_shellService.SetApplicationBusy())
            {
                foreach (IBlog blog in _managerService.BlogFiles)
                {
                    if (blog.Dirty)
                    {
                        blog.Save();
                    }
                }

                _managerService.CacheLibraries();
            }
        }