Ejemplo n.º 1
0
        internal void DeserializeNode(DataNode node, SerializedData state)
        {
            if (state.Type != node.GetType())
            {
                throw new Exception($"Type mismatch on deserialization: expected {state.Type}, got {node.GetType()}.");
            }

            reader.Init(state.Bytes);
            node.ReadBytes(reader);
        }