Example #1
0
 /// <summary>
 ///     有返回值
 /// </summary>
 /// <param name="cmdTemplate"></param>
 /// <param name="respTemplate"></param>
 /// <param name="timeout"></param>
 /// <param name="desc"></param>
 public CommContext(string cmdTemplate, string respTemplate, int timeout = 1000, string desc = "")
 {
     Command  = new CommCommand(cmdTemplate);
     Response = new CommResponse(respTemplate);
     Timeout  = timeout;
     Desc     = desc;
 }
Example #2
0
 /// <summary>
 ///     无返回值
 /// </summary>
 /// <param name="cmdTemplate"></param>
 /// <param name="desc"></param>
 public CommContext(string cmdTemplate, string desc = "")
 {
     Command  = new CommCommand(cmdTemplate);
     Response = new CommResponse();
     Timeout  = 0;
     Desc     = desc;
 }