void IHandle <LogOutputEventArgs> .Handle(LogOutputEventArgs arg) { Application.Current.Dispatcher.Invoke(() => { this._logOutputMsgs.Add(arg.Content); this.NotifyOfPropertyChange(() => this.Output); }); }
private void InsertEntry(LogOutputEventArgs logEntry) { LogOutput?.Invoke(this, logEntry); lock (_entryLock) { // Remove entries if there are too many while (LogEntries.Count > MaxEntries) { LogEntries.Dequeue(); } LogEntries.Enqueue(logEntry); } }
internal void OnLogOutput(object sender, LogOutputEventArgs args) { LogOutput = LogOutput.Insert(0, args.Text + Environment.NewLine); OnPropertyChanged("LogOutput"); }