public async void FillWithChildren() { try { FeedResponse <DocumentCollection> colls; var db = (Database)Tag; var dbId = db.Id; using (PerfStatus.Start("ReadDocumentCollectionFeed")) { colls = await _client.ReadDocumentCollectionFeedAsync(db.GetLink(_client)); } foreach (var coll in colls) { var node = new DocumentCollectionNode(_client, coll, dbId); Nodes.Add(node); } Program.GetMain().SetResponseHeaders(colls.ResponseHeaders); } catch (AggregateException e) { Program.GetMain().SetResultInBrowser(null, e.InnerException.ToString(), true); } catch (Exception e) { Program.GetMain().SetResultInBrowser(null, e.ToString(), true); } }
async public void FillWithChildren() { try { FeedResponse<Documents.DocumentCollection> colls; using (PerfStatus.Start("ReadDocumentCollectionFeed")) { colls = await this.client.ReadDocumentCollectionFeedAsync(((Documents.Database)this.Tag).GetLink(this.client)); } foreach (Documents.DocumentCollection coll in colls) { DocumentCollectionNode node = new DocumentCollectionNode(client, coll); this.Nodes.Add(node); } Program.GetMain().SetResponseHeaders(colls.ResponseHeaders); } catch (AggregateException e) { Program.GetMain().SetResultInBrowser(null, e.InnerException.ToString(), true); } catch (Exception e) { Program.GetMain().SetResultInBrowser(null, e.ToString(), true); } }