Esempio n. 1
0
        public void Read(Block_I block, out string stringToRead)
        {
            long iLength;

            block.Read(out iLength);

            if (iLength == 0)
            {
                stringToRead = string.Empty;

                return;
            }

            var oChars = new char[iLength];

            for (var ii = 0; ii < iLength; ii++)
            {
                short currentShort;

                block.Read(out currentShort);

                oChars[ii] = (char)currentShort;
            }

            stringToRead = new string(oChars);
        }
Esempio n. 2
0
        public void Read(Block_I block, out ushort data)
        {
            short dataLong;

            block.Read(out dataLong);

            data = (ushort)dataLong;
        }
Esempio n. 3
0
        public void Read(Block_I block, out DateTime data)
        {
            long ticks;

            block.Read(out ticks);

            data = new DateTime(ticks);
        }
Esempio n. 4
0
        public void Read(Block_I block, out ulong data)
        {
            long dataLong;

            block.Read(out dataLong);

            data = (ulong)dataLong;
        }
Esempio n. 5
0
        public void Read(Block_I block, out uint data)
        {
            int dataLong;

            block.Read(out dataLong);

            data = (uint)dataLong;
        }
Esempio n. 6
0
        public void Read(Block_I block, out TimeSpan data)
        {
            long ticks;

            block.Read(out ticks);

            data = new TimeSpan(ticks);
        }