Exemple #1
0
 public ResultBuilder(SummaryCollector summaryCollector, Action receiveOneAction,
                      IResultResourceHandler resourceHandler = null)
     : base(summaryCollector)
 {
     SetReceiveOneAction(receiveOneAction);
     _resourceHandler = resourceHandler;
 }
Exemple #2
0
 public void CollectSummary(IDictionary <string, object> meta)
 {
     NoMoreRecords();
     if (meta == null)
     {
         return;
     }
     SummaryCollector.Collect(meta);
 }
Exemple #3
0
        public void CollectFields(IDictionary <string, object> meta)
        {
            if (meta == null)
            {
                return;
            }

            CollectKeys(meta, "fields", Keys);
            SummaryCollector.CollectWithFields(meta);
        }
 /// <summary>
 /// Buffer all records left unread into memory and return the summary
 /// </summary>
 /// <returns>The final summary</returns>
 private IResultSummary Summary()
 {
     // read all records into memory
     while (_hasMoreRecords)
     {
         _receiveOneAction.Invoke();
     }
     // return the summary
     return(SummaryCollector.Build());
 }
Exemple #5
0
 /// <summary>
 /// Buffer all records left unread into memory and return the summary
 /// </summary>
 /// <returns>The final summary</returns>
 private async Task <IResultSummary> SummaryAsync()
 {
     // read all records into memory
     while (_hasMoreRecords)
     {
         await _receiveOneFunc().ConfigureAwait(false);
     }
     // return the summary
     return(SummaryCollector.Build());
 }
Exemple #6
0
 public void CollectBookmark(IDictionary <string, object> meta)
 {
     Bookmark = SummaryCollector.CollectBookmark(meta);
 }
Exemple #7
0
 protected ResultBuilderBase(SummaryCollector summaryCollector)
 {
     SummaryCollector = summaryCollector;
 }
Exemple #8
0
 protected ResultBuilderBase(Statement statement, IServerInfo server)
 {
     SummaryCollector = new SummaryCollector(statement, server);
 }
Exemple #9
0
 public ResultCursorBuilder(SummaryCollector summaryCollector, Func <Task> receiveOneFunc, IResultResourceHandler resourceHandler = null)
     : base(summaryCollector)
 {
     SetReceiveOneFunc(receiveOneFunc);
     _resourceHandler = resourceHandler;
 }