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;
}
/// <summary> /// Reads a signed byte and advance the buffer read cursor. /// </summary> /// <param name="buffer">The buffer to read from.</param> /// <returns></returns> public static sbyte ReadByte(ByteBuffer buffer) { buffer.Validate(false, FixedWidth.UByte); sbyte data = (sbyte)buffer.Buffer[buffer.Offset]; buffer.Complete(FixedWidth.UByte); return data; }