Example #1
0
 public ByteSequenceSegment Append(ByteSequenceSegment nextSegment)
 {
     Trace.Assert(nextSegment.RunningIndex == 0);
     Next = nextSegment;
     nextSegment.RunningIndex = RunningIndex + nextSegment.Memory.Length;
     return(nextSegment);
 }
Example #2
0
        public ByteSequenceSegment Append(ReadOnlyMemory <byte> memory)
        {
            var segment = new ByteSequenceSegment(memory)
            {
                RunningIndex = RunningIndex + Memory.Length
            };

            Next = segment;
            return(segment);
        }