Microsoft.Azure.Amqp.ByteBuffer.Complete C# (CSharp) Method

Complete() public method

public Complete ( int size ) : void
size int
return void
        public void Complete(int size)
        {
            Fx.Assert(size >= 0, "size must be positive.");
            Fx.Assert((this.read + size) <= this.write, "Complete size too large.");
            this.read += size;
        }

Usage Example

Example #1
0
        static Error AdvanceBuffer(ByteBuffer buffer, uint size)
        {
            if (size > buffer.Length)
            {
                return(GetDecodeError(AmqpResources.GetString(Resources.AmqpInsufficientBufferSize, size, buffer.Length)));
            }

            buffer.Complete((int)size);
            return(null);
        }
All Usage Examples Of Microsoft.Azure.Amqp.ByteBuffer::Complete