We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30f6b74 commit 0a5945dCopy full SHA for 0a5945d
src/Command(命令)/common.ts
@@ -8,7 +8,7 @@ class Invoker {
8
public setCommand(command: Command): void {
9
this.command = command;
10
}
11
- public call(): void {
+ public run(): void {
12
console.log("调用者执行命令command...");
13
this.command.execute();
14
@@ -38,13 +38,13 @@ class Client {
38
public static main(): void {
39
const cmd: Command = new ConcreteCommand();
40
const ir: Invoker = new Invoker(cmd);
41
- console.log("客户访问调用者的call()方法...");
42
- ir.call();
+ console.log("客户访问调用者的run()方法...");
+ ir.run();
43
44
45
Client.main()
46
47
48
-// 客户访问调用者的call()方法...
+// 客户访问调用者的run()方法...
49
// 调用者执行命令command...
50
-// 接收者的action()方法被调用...
+// 接收者的action()方法被调用...
0 commit comments