예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #5
0
 public void Write(int i)
 {
     this.Reserve(4);
     this.writer.Write(ByteConverter.ReverseEndian(i));
 }
예제 #6
0
 public void Write(short s)
 {
     this.Reserve(2);
     this.writer.Write(ByteConverter.ReverseEndian(s));
 }
예제 #7
0
 public void Write(ulong l)
 {
     this.Reserve(8);
     this.writer.Write(ByteConverter.ReverseEndian(l));
 }