Amqp.ByteBuffer.Append C# (CSharp) Method

Append() public method

Advances the write position. As a result, length is increased by size.
public Append ( int size ) : void
size int Size to advance.
return void
        public void Append(int size)
        {
            Fx.Assert(size >= 0, "size must be positive.");
            Fx.Assert((this.write + size) <= this.end, "Append size too large.");
            this.write += size;
        }

Usage Example

Beispiel #1
0
 public static void FRM(Stream stream, ulong code, byte type, ushort channel, params object[] value)
 {
     List list = new List();
     if (value != null) list.AddRange(value);
     ByteBuffer buffer = new ByteBuffer(256, true);
     buffer.Append(4);
     AmqpBitConverter.WriteUByte(buffer, 2);
     AmqpBitConverter.WriteUByte(buffer, type);
     AmqpBitConverter.WriteUShort(buffer, channel);
     Encoder.WriteObject(buffer, new DescribedValue(code, list));
     AmqpBitConverter.WriteInt(buffer.Buffer, 0, buffer.Length);
     stream.Write(buffer.Buffer, buffer.Offset, buffer.Length);
 }
All Usage Examples Of Amqp.ByteBuffer::Append