Catel.LogAnalyzer.ViewModels.ShellViewModel.OnParseCommandExecute C# (CSharp) Method

OnParseCommandExecute() private method

Method to invoke when the ParseCommand command is executed.
private OnParseCommandExecute ( ) : void
return void
        private void OnParseCommandExecute()
        {
            _pleaseWaitService.Push();

            _logEntries = new FastObservableCollection<LogEntry>(_logAnalyzerService.Parse(Filter, Document.Text));

            _dispatcherService.BeginInvoke(() =>
            {
                    var top10SlowestMethods = _logEntries.OrderByDescending(log => log.Time).Take(10);
                    var top10MostCommonLines = _logAnalyzerService.Filter(_logEntries, 10, log => log.LogEvent != LogEvent.Error && log.LogEvent != LogEvent.Warning, null, key => key.Time);
                    var top10ErrorsAndWarnings = _logAnalyzerService.Filter(_logEntries, 10, log => log.LogEvent == LogEvent.Error || log.LogEvent == LogEvent.Warning, null, key => key.Time);

                    _pleaseWaitService.Pop();

                    Top10SlowestMethods = new FastObservableCollection<LogEntry>(top10SlowestMethods);
                    Top10MostCommonLines = new FastObservableCollection<LogEntry>(top10MostCommonLines);
                    Top10ErrorsAndWarnings = new FastObservableCollection<LogEntry>(top10ErrorsAndWarnings);
            });
        }
        #endregion