private async Task RefreshStatus() { var handle = ui.StartIndicateLongOperation("Gettings status of the experiment..."); try { var resp = (await Task.Run(() => manager.GetStatus(new[] { id }))).FirstOrDefault(); if (resp == null) { return; } this.status = resp; Note = status.Note; } finally { ui.StopIndicateLongOperation(handle); } NotifyPropertyChanged("Status"); NotifyPropertyChanged("NoteChanged"); NotifyPropertyChanged("SubmissionTime"); NotifyPropertyChanged("BenchmarksTotal"); NotifyPropertyChanged("BenchmarksDone"); NotifyPropertyChanged("BenchmarksQueued"); NotifyPropertyChanged("Creator"); }
public Task <double> GetRuntimes(int[] ids) { return(Task.Run(async() => { var res = await manager.GetStatus(ids); return res.Sum(r => r.TotalRuntime.TotalSeconds); })); }