private async Task RefreshDataAsync() { if (_eventLogTable == null) { var account = CloudStorageAccount.Parse(Secrets.StorageConnectionString); var tableClient = account.CreateCloudTableClient(); _eventLogTable = tableClient.GetTableReference("EventLog"); await _eventLogTable.CreateIfNotExistsAsync(); } EventLogs.Clear(); var buffer = new List <EventLog>(); TableContinuationToken token = null; var query = new TableQuery <EventLog>(); do { var result = await _eventLogTable.ExecuteQuerySegmentedAsync(query, token); token = result.ContinuationToken; buffer.AddRange(result.Results); }while (token != null); foreach (var x in buffer.OrderBy(x => x.Timestamp)) { EventLogs.Add(x); } }
/// <summary> /// Dispose the timer objects. /// </summary> public void Dispose() { timer.Stop(); BusyIndicatorItems.Clear(); EventLogs.Clear(); }