private async Task MoveNextAsync(CancellationToken cancellationToken)
        {
            bool result = await _resultStream.MoveNext(cancellationToken).ConfigureAwait(false);

            _currentResultSet = result ? _resultStream.Current : null;
            _nextIndex        = 0;
            if (Stats == null)
            {
                Stats = _currentResultSet?.Stats;
            }
        }
Example #2
0
 private void RecordStatistics()
 {
     if (_isReading)
     {
         // We only expect to see a single set of stats, but if we reconnect we might
         // see two non-null values.
         var stats = _currentCall?.ResponseStream.Current.Stats;
         if (stats != null)
         {
             Stats = stats;
         }
     }
 }