Esempio n. 1
0
        public bool TryGet(ref Collections.Sequences.Position position, out ReadOnlyMemory <byte> item, bool advance = true)
        {
            var(data, index) = position.Get <object>();
            var p      = new Position(data, index);
            var result = _buffer.TryGet(ref p, out item);

            if (advance)
            {
                position = Collections.Sequences.Position.Create(p.Segment, p.Index);
            }

            return(result);
        }
Esempio n. 2
0
 public bool TryGet(ref SequencePosition position, out ReadOnlyMemory <byte> item, bool advance = true)
 => _buffer.TryGet(ref position, out item, advance);