public void Deserialize(BinaryReader reader) { Type = (VMCommandType)reader.ReadByte(); Type cmdType = CmdMap[Type]; Command = (VMNetCommandBodyAbstract)Activator.CreateInstance(cmdType); Command.Deserialize(reader); }
public void SetCommand(VMNetCommandBodyAbstract cmd) { Type = ReverseMap[cmd.GetType()]; Command = cmd; }