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;
}
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); }