Example #1
0
        /// <summary>
        /// Advances the sequence to include the specified number of elements initialized into memory
        /// returned by a prior call to <see cref="GetMemory(int)"/>.
        /// </summary>
        /// <param name="count">The number of elements written into memory.</param>
        public void Advance(int count)
        {
            SequenceSegment last = this.last;

            Debug.Assert(last != null, "Cannot advance before acquiring memory.");
            last.Advance(count);
        }
Example #2
0
        /// <summary>
        /// Advances the sequence to include the specified number of elements initialized into memory
        /// returned by a prior call to <see cref="GetMemory(int)"/>.
        /// </summary>
        /// <param name="count">The number of elements written into memory.</param>
        public void Advance(int count)
        {
            SequenceSegment last = this.last;

            Verify.Operation(last != null, "Cannot advance before acquiring memory.");
            last.Advance(count);
        }
Example #3
0
        /// <summary>
        /// Advances the sequence to include the specified number of elements initialized into memory
        /// returned by a prior call to <see cref="GetMemory(int)"/>.
        /// </summary>
        /// <param name="count">The number of elements written into memory.</param>
        public void Advance(int count)
        {
            SequenceSegment last = this.last;

            Verify.Operation(last != null, "Cannot advance before acquiring memory.");
            last.Advance(count);
            this.ConsiderMinimumSizeIncrease();
        }