Ejemplo n.º 1
0
 public ushort Read(ref ushort v)
 {
     if (this.buffer == null || this.position >= this.buffer.Length)
     {
         return(0);
     }
     v              = BitConverter.ToUInt16(this.buffer, this.position);
     this.position += 2;
     v              = ByteConverter.ReverseEndian(v);
     return(v);
 }
Ejemplo n.º 2
0
 public int Read(ref int v)
 {
     if (this.buffer == null || this.position >= this.buffer.Length)
     {
         return(0);
     }
     v              = BitConverter.ToInt32(this.buffer, this.position);
     this.position += 4;
     v              = ByteConverter.ReverseEndian(v);
     return(v);
 }
Ejemplo n.º 3
0
 public ulong Read(ref ulong v)
 {
     if (this.buffer == null || this.position >= this.buffer.Length)
     {
         return(0uL);
     }
     v              = BitConverter.ToUInt64(this.buffer, this.position);
     this.position += 8;
     v              = ByteConverter.ReverseEndian(v);
     return(v);
 }
Ejemplo n.º 4
0
 public long Read(ref long v)
 {
     if ((this.buffer == null) || (this.position >= this.buffer.Length))
     {
         return(0L);
     }
     v              = BitConverter.ToInt64(this.buffer, this.position);
     this.position += 8;
     v              = ByteConverter.ReverseEndian(v);
     return(v);
 }
Ejemplo n.º 5
0
 public void Write(int i)
 {
     this.Reserve(4);
     this.writer.Write(ByteConverter.ReverseEndian(i));
 }
Ejemplo n.º 6
0
 public void Write(short s)
 {
     this.Reserve(2);
     this.writer.Write(ByteConverter.ReverseEndian(s));
 }
Ejemplo n.º 7
0
 public void Write(ulong l)
 {
     this.Reserve(8);
     this.writer.Write(ByteConverter.ReverseEndian(l));
 }