Exemple #1
0
        public void UnMarshal(MMStream stream)
        {
            num = stream.ReadInt32();

            if (num < aoi_data.totalLength)
            {
                aoi_data.SetUsedLength(num);
                for (int i = 0; i < num; i++)
                {
                    var aoiarr = aoi_data.getArray()[i];
                    stream.ReadFixByteArray(ref aoiarr);
                }
            }
        }
Exemple #2
0
        public int ReadFixByteArray(ref FixedLengthArray <byte> data)
        {
            int dataActLen = ReadUInt16();

            if (data.totalLength < dataActLen)
            {
                throw new EndOfStreamException(string.Format("Capicity={0}, WPos={1}, RPos={2}", Capicity, WPos, RPos));
            }

            data.Clear();
            data.SetUsedLength(dataActLen);
            var arr = data.getArray();

            ReadBytes(ref arr, dataActLen);
            return(dataActLen + 2);
        }
Exemple #3
0
        public void UnMarshal(MMStream stream)
        {
            num = stream.ReadUInt32();

            eids.Clear();

            eds.SetUsedLength((int)num);

            for (int i = 0; i < num; i++)
            {
                eids.Add(stream.ReadUInt64());

                //int blen = stream.ReadUInt16();

                var edsbytearr = eds.getArray()[i];
                if (edsbytearr == null)
                {
                    eds.getArray()[i] = new FixedLengthArray <byte>(2048);
                    edsbytearr        = eds.getArray()[i];
                }

                stream.ReadFixByteArray(ref edsbytearr);
            }
        }