Ejemplo n.º 1
0
        private void SolutionAboutToClose()
        {
            try
            {
                // JZ: SrcMLService Integration
                //srcMLService.StopMonitoring();
                // TODO: DocumentIndexer.CommitChanges(); DocumentIndexer.Dispose(false);
                // End of code changes



                if (_srcMLArchive != null)
                {
                    _srcMLArchive.Dispose();
                    _srcMLArchive = null;
                    ServiceLocator.Resolve <IndexFilterManager>().Dispose();
                    ServiceLocator.Resolve <DocumentIndexer>().Dispose();
                }
                // XiGe: dispose the dictionary.
                ServiceLocator.Resolve <DictionaryBasedSplitter>().Dispose();
                ServiceLocator.Resolve <SearchHistory>().Dispose();
                var control = ServiceLocator.Resolve <SearchViewControl>();
                control.Dispatcher.Invoke((Action)(() => UpdateDirectory(SearchViewControl.DefaultOpenSolutionMessage, control)));
            }
            catch (Exception e)
            {
                LogEvents.UISolutionClosingError(this, e);
            }
        }