private async Task LoadDocuments(bool cleanContent = false) { try { IsRunning = true; if (cleanContent) { Documents.Clear(); ContinuationToken = null; } var list = await _dbService.GetDocumentsAsync(Connection, Collection, Filter, Settings.Default.MaxDocumentToRetrieve, ContinuationToken, this) .ConfigureAwait(true); HasMore = list.HasMore; ContinuationToken = list.ContinuationToken; RequestCharge = $"Request Charge: {list.RequestCharge:N2}"; foreach (var document in list) { Documents.Add(document); } RaisePropertyChanged(() => ItemsCount); } catch (DocumentClientException clientEx) { await _dialogService.ShowError(clientEx.Parse(), "Error", "ok", null).ConfigureAwait(false); } catch (Exception ex) { await _dialogService.ShowError(ex, "Error", "ok", null).ConfigureAwait(false); } finally { IsRunning = false; } }