示例#1
0
        public void AddUInt()
        {
            uint valNotConverted = 254;
            uint val             = valNotConverted;

            if (m_useBE)
            {
                val = (uint)IPAddress.HostToNetworkOrder((int)val);
            }

            byte[] frameworkArray = BitConverter.GetBytes(val);

            List <byte> customArray = new List <byte>(2);

            m_bitConverter.AddUInt(customArray, valNotConverted);

            Assert.That(customArray, Is.EquivalentTo(frameworkArray));
        }
示例#2
0
 /// <summary>
 /// Writes a uint to the encoder
 /// </summary>
 /// <param name="val">The uint to write to the encoder</param>
 public void Write32(uint val)
 {
     m_fastBitConverter.AddUInt(m_buffer, val);
 }