コード例 #1
0
        /// <summary>
        /// Method ReadInt32
        /// </summary>
        /// <returns>An int</returns>
        public override int ReadInt32()
        {
            int x = base.ReadInt32();
            int y = EndianSupport.SwitchEndian(x);

            return(y);
        }
コード例 #2
0
 /// <summary>
 /// Method Write
 /// </summary>
 /// <param name="chars">A  char[]</param>
 /// <param name="index">An int</param>
 /// <param name="count">An int</param>
 public override void Write(char[] chars, int index, int count)
 {
     char[] t = new char[count];
     for (int i = 0; i < count; i++)
     {
         t[index + i] = EndianSupport.SwitchEndian(t[index + i]);
     }
     base.Write(t);
 }
コード例 #3
0
        /// <summary>
        /// Method Read
        /// </summary>
        /// <returns>An int</returns>
        /// <param name="buffer">A  char[]</param>
        /// <param name="index">An int</param>
        /// <param name="count">An int</param>
        public override int Read(char[] buffer, int index, int count)
        {
            int size = base.Read(buffer, index, count);

            for (int i = 0; i < size; i++)
            {
                buffer[index + i] = EndianSupport.SwitchEndian(buffer[index + i]);
            }
            return(size);
        }
コード例 #4
0
 /// <summary>
 /// Method ReadChars
 /// </summary>
 /// <returns>A char[]</returns>
 /// <param name="count">An int</param>
 public override char[] ReadChars(int count)
 {
     char[] rc = base.ReadChars(count);
     if (rc != null)
     {
         for (int i = 0; i < rc.Length; i++)
         {
             rc[i] = EndianSupport.SwitchEndian(rc[i]);
         }
     }
     return(rc);
 }
コード例 #5
0
 /// <summary>
 /// Method ReadInt64
 /// </summary>
 /// <returns>A long</returns>
 public override long ReadInt64()
 {
     return(EndianSupport.SwitchEndian(base.ReadInt64()));
 }
コード例 #6
0
 /// <summary>
 /// Method ReadInt16
 /// </summary>
 /// <returns>A short</returns>
 public override short ReadInt16()
 {
     return(EndianSupport.SwitchEndian(base.ReadInt16()));
 }
コード例 #7
0
 public override double ReadDouble()
 {
     return(EndianSupport.SwitchEndian(base.ReadDouble()));
 }
コード例 #8
0
 public override float ReadSingle()
 {
     return(EndianSupport.SwitchEndian(base.ReadSingle()));
 }
コード例 #9
0
 /// <summary>
 /// Method ReadUInt32
 /// </summary>
 /// <returns>An uint</returns>
 public override uint ReadUInt32()
 {
     return(EndianSupport.SwitchEndian(base.ReadUInt32()));
 }
コード例 #10
0
 /// <summary>
 /// Method Write
 /// </summary>
 /// <param name="value">An uint</param>
 public override void Write(uint value)
 {
     base.Write(EndianSupport.SwitchEndian(value));
 }
コード例 #11
0
        /// <summary>
        /// Method Write
        /// </summary>
        /// <param name="value">An int</param>
        public override void Write(int value)
        {
            int x = EndianSupport.SwitchEndian(value);

            base.Write(x);
        }