comparison datagear/command/CommandBuilder.cs @ 16:7352793b5dbe

add some Commands
author riono <e165729@ie.u-ryukyu.ac.jp>
date Sun, 22 Nov 2020 01:52:22 +0900
parents 277dd59bf1e2
children 4a3115ba746d
comparison
equal deleted inserted replaced
15:49521c7269bc 16:7352793b5dbe
3 using Christie_net.daemon; 3 using Christie_net.daemon;
4 using Christie_net.datagear.dg; 4 using Christie_net.datagear.dg;
5 5
6 namespace Christie_net.datagear.command { 6 namespace Christie_net.datagear.command {
7 public class CommandBuilder { 7 public class CommandBuilder {
8 private CommandType _type;
8 protected internal CommandTypeEtx type; 9 protected internal CommandTypeEtx type;
9 protected internal string key = null; 10 protected internal string key = null;
10 protected internal string toDgmName = null; // for take 11 protected internal string toDgmName = null; // for take
11 protected internal string fromDgmname = "local"; // for remotetake/reply 12 protected internal string fromDgmname = "local"; // for remotetake/reply
12 protected internal int? cgmID = null; // for local meta 13 protected internal int? cgmID = null; // for local meta
15 protected internal Type clazz = null; // for remote 16 protected internal Type clazz = null; // for remote
16 protected internal Connection connection = null; // for reply 17 protected internal Connection connection = null; // for reply
17 18
18 //private CommandFactory factory = new CommandFactory(); 19 //private CommandFactory factory = new CommandFactory();
19 20
20 public CommandBuilder init(CommandTypeEtx type) { 21 public CommandBuilder init(CommandType type) {
21 this.type = type; 22 this._type = type;
23 this.type = new CommandTypeEtx(_type);
22 this.key = null; 24 this.key = null;
23 this.toDgmName = null; 25 this.toDgmName = null;
24 this.fromDgmname = "local"; 26 this.fromDgmname = "local";
25 this.cgmID = null; 27 this.cgmID = null;
26 this.cg = null; 28 this.cg = null;
27 this.dg = null; 29 this.dg = null;
28 this.clazz = null; 30 this.clazz = null;
29 this.connection = null; 31 this.connection = null;
30 return this; 32 return this;
31 } 33 }
32
33
34 } 34 }
35 } 35 }