示例#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);
        }
示例#2
0
        public void Read(Block_I block, out ushort data)
        {
            short dataLong;

            block.Read(out dataLong);

            data = (ushort)dataLong;
        }
示例#3
0
文件: DateTimeApi.cs 项目: E01D/Base
        public void Read(Block_I block, out DateTime data)
        {
            long ticks;

            block.Read(out ticks);

            data = new DateTime(ticks);
        }
示例#4
0
        public void Read(Block_I block, out ulong data)
        {
            long dataLong;

            block.Read(out dataLong);

            data = (ulong)dataLong;
        }
示例#5
0
        public void Read(Block_I block, out uint data)
        {
            int dataLong;

            block.Read(out dataLong);

            data = (uint)dataLong;
        }
示例#6
0
文件: TimeSpanApi.cs 项目: E01D/Base
        public void Read(Block_I block, out TimeSpan data)
        {
            long ticks;

            block.Read(out ticks);

            data = new TimeSpan(ticks);
        }