/// <summary>
 /// Reads a <see cref="char"/> from the message body.
 /// </summary>
 public char ReadChar()
 {
     return(BytesWireFormatting.ReadChar(Reader));
 }
 /// <summary>
 /// Reads a <see cref="double"/> from the message body.
 /// </summary>
 public double ReadDouble()
 {
     return(BytesWireFormatting.ReadDouble(Reader));
 }
 /// <summary>
 /// Reads a <see cref="byte"/> from the message body.
 /// </summary>
 public byte ReadByte()
 {
     return(BytesWireFormatting.ReadByte(Reader));
 }
 /// <summary>
 /// Reads a given number of bytes from the message body.
 /// </summary>
 public byte[] ReadBytes(int count)
 {
     return(BytesWireFormatting.ReadBytes(Reader, count));
 }
 /// <summary>
 /// Writes a <see cref="short"/> value into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteInt16(short value)
 {
     BytesWireFormatting.WriteInt16(Writer, value);
     return(this);
 }
 /// <summary>
 /// Reads a given number ("count") of bytes from the message body,
 /// placing them into "target", starting at "offset".
 /// </summary>
 public int Read(byte[] target, int offset, int count)
 {
     return(BytesWireFormatting.Read(Reader, target, offset, count));
 }
 /// <summary>
 /// Write a <see cref="byte"/> array into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteBytes(byte[] source)
 {
     BytesWireFormatting.WriteBytes(Writer, source);
     return(this);
 }
Exemple #8
0
 /// <summary>
 /// Reads a <see cref="long"/> from the message body.
 /// </summary>
 public long ReadInt64()
 {
     return(BytesWireFormatting.ReadInt64(Reader));
 }
 /// <summary>
 /// Write a section of a byte array into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder Write(byte[] source, int offset, int count)
 {
     BytesWireFormatting.Write(Writer, source, offset, count);
     return(this);
 }
 /// <summary>
 /// Writes a <see cref="byte"/> value into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteByte(byte value)
 {
     BytesWireFormatting.WriteByte(Writer, value);
     return(this);
 }
 /// <summary>
 /// Writes a <see cref="string"/> value into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteString(string value)
 {
     BytesWireFormatting.WriteString(Writer, value);
     return(this);
 }
 /// <summary>
 /// Writes a <see cref="float"/> value into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteSingle(float value)
 {
     BytesWireFormatting.WriteSingle(Writer, value);
     return(this);
 }
 /// <summary>
 /// Writes a <see cref="long"/> value into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteInt64(long value)
 {
     BytesWireFormatting.WriteInt64(Writer, value);
     return(this);
 }
Exemple #14
0
 /// <summary>
 /// Reads a <see cref="short"/> from the message body.
 /// </summary>
 public short ReadInt16()
 {
     return(BytesWireFormatting.ReadInt16(Reader));
 }
 /// <summary>
 /// Writes a <see cref="char"/> value into the message body being assembled.
 /// </summary>
 public IBytesMessageBuilder WriteChar(char value)
 {
     BytesWireFormatting.WriteChar(Writer, value);
     return(this);
 }
Exemple #16
0
 /// <summary>
 /// Reads an <see cref="int"/> from the message body.
 /// </summary>
 public int ReadInt32()
 {
     return(BytesWireFormatting.ReadInt32(Reader));
 }
 /// <summary>
 /// Reads a <see cref="string"/> from the message body.
 /// </summary>
 public string ReadString()
 {
     return(BytesWireFormatting.ReadString(Reader));
 }
Exemple #18
0
 /// <summary>
 /// Reads a <see cref="float"/> from the message body.
 /// </summary>
 public float ReadSingle()
 {
     return(BytesWireFormatting.ReadSingle(Reader));
 }
Exemple #19
0
 public void TestSingleDecoding()
 {
     Assert.AreEqual(1.234f,
                     BytesWireFormatting.ReadSingle(Reader
                                                        (new byte[] { 63, 157, 243, 182 })));
 }