Beispiel #1
0
        async Task <bool> ReadNextBatch()
        {
            if (_readCheckpoint == 0)
            {
                return(false);
            }

            var batch = await ReadBatch();

            foreach (var e in batch.Events)
            {
                _readCheckpoint = e.Link.EventNumber;

                var areaPosition = e.Event.EventNumber;

                if (areaPosition < _scheduleFirst)
                {
                    return(false);
                }

                if (areaPosition <= _scheduleLast && _schedule.Contains(areaPosition))
                {
                    _points.Write.Insert(0, _context.ReadAreaPoint(e));
                }
            }

            return(!batch.IsEndOfStream);
        }
Beispiel #2
0
 public bool IsImmediateGiven() =>
 Topic != null && Routes.Contains(Topic);