public async Task Clear() { await Task.Factory.StartNew(() => Messages.Clear()); OnMessagesChanged?.Invoke(this, Messages); }
public async Task Add(string message) { await Task.Factory.StartNew(() => Messages.Add(message)); OnMessagesChanged?.Invoke(this, Messages); }