private Task <StatusMessage> ProcessStatuses(StatusMessage msg) { return(Task.Run(() => { var ret = msg.DeepCopy(); if (ret == null) { return msg; } foreach (var i in Plugins) { ret = i.StatusUpdateDestructive(ret, PluginMonitoringToken) ?? ret; } return ret; })); }
private async void NotifyStatusUpdate(StatusMessage msg) { CacheStatuses(msg); if (msg.Type != MessageType.Create) { return; } LatestStatus = await ProcessStatuses(msg); ShowingStatuses.Enqueue(LatestStatus.Status); RaisePropertyChanged("Status"); await Task.Run(() => { foreach (var p in Plugins) { p.StatusUpdate(msg.DeepCopy(), PluginMonitoringToken); } }); }
private Task<StatusMessage> ProcessStatuses(StatusMessage msg) { return Task.Run(() => { var ret = msg.DeepCopy(); if (ret == null) return msg; foreach (var i in Plugins) { ret = i.StatusUpdateDestructive(ret, PluginMonitoringToken) ?? ret; } return ret; }); }
private async void NotifyStatusUpdate(StatusMessage msg) { CacheStatuses(msg); if (msg.Type != MessageType.Create) return; LatestStatus = await ProcessStatuses(msg); ShowingStatuses.Enqueue(LatestStatus.Status); RaisePropertyChanged("Status"); await Task.Run(() => { foreach (var p in Plugins) p.StatusUpdate(msg.DeepCopy(), PluginMonitoringToken); }); }