Ejemplo n.º 1
0
        private void deSerialize(AutoCSer.BinaryDeSerializer deSerializer)
        {
            if (deSerializer.GetBuffer(ref Buffer))
            {
                int size;

                fixed(byte *bufferFixed = Buffer.BufferArray) size = *(int *)(bufferFixed + Buffer.StartIndex);

                if (deSerializer.MoveRead(size))
                {
                    Buffer = Buffer.GetSub(sizeof(int), size - sizeof(int));
                }
            }
            else
            {
                deSerializer.MoveRead(-1);
            }
        }