private void Next(object source, ElapsedEventArgs e) { if (_index >= _data.Capacity) { _sink.Complete(); _timer.Stop(); _promise.TrySetResult(true); } else { _sink.Deliver(_data[_index++]); } }
private void Next(object sender, ElapsedEventArgs e) { _sink.Deliver(_counter++); }