Beispiel #1
0
        internal ReadableBuffer(ReadCursor start, ReadCursor end)
        {
            _start = start;
            _end   = end;

            start.TryGetBuffer(end, out _first, out start);

            _length = -1;
        }
Beispiel #2
0
        internal ReadableBuffer(ReadCursor start, ReadCursor end, bool isOwner)
        {
            _start   = start;
            _end     = end;
            _isOwner = isOwner;

            start.TryGetBuffer(end, out _first, out start);

            _length = -1;
        }
Beispiel #3
0
        private ReadableBuffer(ref ReadableBuffer buffer)
        {
            var begin = buffer._start;
            var end   = buffer._end;

            BufferSegment segmentTail;
            var           segmentHead = BufferSegment.Clone(begin, end, out segmentTail);

            begin = new ReadCursor(segmentHead);
            end   = new ReadCursor(segmentTail, segmentTail.End);

            _start = begin;
            _end   = end;

            _length = buffer._length;

            begin.TryGetBuffer(end, out _first, out begin);
        }