Mercurial > hg > Database > Christie-sharp
comparison datagear/command/Command.cs @ 11:1f7d4f168b89
socket test
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 Nov 2020 03:05:28 +0900 |
parents | ce6906edcbf4 |
children | e4b46d4ef79c |
comparison
equal
deleted
inserted
replaced
10:5f726dc31874 | 11:1f7d4f168b89 |
---|---|
11 public string fromDgmName = "local"; // for remotetake/reply | 11 public string fromDgmName = "local"; // for remotetake/reply |
12 public int? cgmID = -1; // for localtake | 12 public int? cgmID = -1; // for localtake |
13 public CodeGear cg; // for localtake | 13 public CodeGear cg; // for localtake |
14 public DataGear<object> dg; // for put/localtake/reply | 14 public DataGear<object> dg; // for put/localtake/reply |
15 public Type clazz; // for remote | 15 public Type clazz; // for remote |
16 public Connection connection = null; // for reply | 16 //public Connection connection = null; // for reply |
17 | 17 |
18 public Command(CommandBuilder cb) { | 18 public Command(CommandBuilder cb) { |
19 this.type = cb.type; | 19 this.type = cb.type; |
20 this.key = cb.key; | 20 this.key = cb.key; |
21 this.toDgmName = cb.toDgmName; | 21 this.toDgmName = cb.toDgmName; |
22 this.fromDgmName = cb.fromDgmname; | 22 this.fromDgmName = cb.fromDgmname; |
23 this.cgmID = cb.cgmID; | 23 this.cgmID = cb.cgmID; |
24 this.cg = cb.cg; | 24 this.cg = cb.cg; |
25 this.dg = cb.dg; | 25 this.dg = cb.dg; |
26 this.clazz = cb.clazz; | 26 this.clazz = cb.clazz; |
27 this.connection = cb.connection; | 27 //this.connection = cb.connection; |
28 } | 28 } |
29 | 29 |
30 // instead of any Constoractor args | 30 // instead of any Constoractor args |
31 protected void CheckNeedParam(CommandBuilder cb) { } | 31 protected void CheckNeedParam(CommandBuilder cb) { } |
32 | 32 |
33 public abstract void Execute(); | 33 public abstract void Execute(); |
34 | 34 |
35 // for remote | 35 // for remote |
36 public abstract MemoryStream Convert(); | 36 public abstract MemoryStream Convert(); |
37 | 37 |
38 public RemoteMassage CreateRemoteMessage() { | 38 // public RemoteMassage CreateRemoteMessage() { |
39 return new RemoteMassage(type.id); | 39 // return new RemoteMassage(type.id); |
40 } | 40 // } |
41 | 41 |
42 public void SetDg(Object obj) { | 42 public void SetDg(Object obj) { |
43 this.dg.SetData(obj); | 43 this.dg.SetData(obj); |
44 } | 44 } |
45 | 45 |
46 public override string ToString() { | 46 public override string ToString() { |
47 return "Command : type = " + type.commandType + ", key = " + key + "toDgmName = " + toDgmName + | 47 // return "Command : type = " + type.commandType + ", key = " + key + "toDgmName = " + toDgmName + |
48 " fromDgmName = " + fromDgmName + " cgmID = " + cgmID + " cg = " + cg + " dg = " + dg + " clazz = " + | 48 // " fromDgmName = " + fromDgmName + " cgmID = " + cgmID + " cg = " + cg + " dg = " + dg + " clazz = " + |
49 clazz + "connection = " + connection; | 49 // clazz + "connection = " + connection; |
50 return null; | |
50 } | 51 } |
51 } | 52 } |
52 } | 53 } |