Exemple #1
0
        public int BinaryDeserialize(byte[] ioBuffer, int inOffset)
        {
            int offset = inOffset;

            offset = BinarySerializeUtils.Deserialize(ioBuffer, offset, out _name);

            offset  = BinarySerializeUtils.Deserialize(ioBuffer, offset, out bool is_array);
            IsArray = is_array;

            offset = BinarySerializeUtils.Deserialize(ioBuffer, offset, out short size);

            _values.Clear();
            for (int i = 0; i < size; i++)
            {
                offset = AddValue(ioBuffer, offset);
            }

            offset = BinarySerializeUtils.Deserialize(ioBuffer, offset, out size);
            _keys.Clear();

            for (int i = 0; i < size; i++)
            {
                CKey child = CreateChild(this, string.Empty);
                offset = child.BinaryDeserialize(ioBuffer, offset);
            }

            return(offset);
        }