コード例 #1
0
 public void Write(double value)
 {
     if (needConvertEndian)
     {
         writer.Write(EndianSwap.SwapInt64(EndianSwap.DoubleToInt64Bits(value)));
     }
     else
     {
         writer.Write(value);
     }
 }
コード例 #2
0
 public float ReadSingle()
 {
     if (needConvertEndian)
     {
         return(EndianSwap.Int32BitsToFloat(EndianSwap.SwapInt32(reader.ReadInt32())));
     }
     else
     {
         return(reader.ReadSingle());
     }
 }
コード例 #3
0
 public void Write(float value)
 {
     if (needConvertEndian)
     {
         writer.Write(EndianSwap.SwapInt32(EndianSwap.FloatToInt32Bits(value)));
     }
     else
     {
         writer.Write(value);
     }
 }
コード例 #4
0
 public double ReadDouble()
 {
     if (needConvertEndian)
     {
         return(EndianSwap.Int64BitsToDouble(EndianSwap.SwapInt64(reader.ReadInt64())));
     }
     else
     {
         return(reader.ReadDouble());
     }
 }
コード例 #5
0
 public void Write(ulong value)
 {
     writer.Write(needConvertEndian ? EndianSwap.SwapUInt64(value) : value);
 }
コード例 #6
0
 public void Write(uint value)
 {
     writer.Write(needConvertEndian ? EndianSwap.SwapUInt32(value) : value);
 }
コード例 #7
0
 public void Write(ushort value)
 {
     writer.Write(needConvertEndian ? EndianSwap.SwapUInt16(value) : value);
 }
コード例 #8
0
 public ulong ReadUInt64()
 {
     return(needConvertEndian ? EndianSwap.SwapUInt64(reader.ReadUInt64()) : reader.ReadUInt64());
 }
コード例 #9
0
 public int ReadInt32()
 {
     return(needConvertEndian ? EndianSwap.SwapInt32(reader.ReadInt32()) : reader.ReadInt32());
 }
コード例 #10
0
 public ushort ReadUInt16()
 {
     return(needConvertEndian ? EndianSwap.SwapUInt16(reader.ReadUInt16()) : reader.ReadUInt16());
 }