public void InvokeGenerate(StackStateMachine machine, Instruction instruction) { if (InstructionCollection.ContainsKey(instruction.Args[0].Value)) { CommandHost host = InstructionCollection[instruction.Args[0].Value]; host.Invoke(machine, instruction); return; } throw new ArgumentException("不能生成 " + instruction.Args[0].Value); }
void performInstruction(Instruction instruction) { if (InstructionCollection.ContainsKey(instruction.InstructionCode)) { CommandHost host = InstructionCollection[instruction.InstructionCode]; host.Invoke(this, instruction); return; } throw new ArgumentException("没有这样的命令:" + instruction.InstructionCode); }