private async void MessageFileOnChanged(object sender, FileSystemEventArgs e) { await Task.Delay(100); LoadMessages(); MessagesChanged?.Invoke(this, EventArgs.Empty); }
public void RaiseMessagesChangedEvent(ConcurrentBag <Message> newMessages) => MessagesChanged?.Invoke(newMessages);