Example #1
0
 public static void HandleDSCommand(DSCommandType commandType)
 {
     if (CommandMap.ContainsKey(commandType))
     {
         var       handler     = CommandMap[commandType];
         StateInfo stateObject = new StateInfo(handler);
         ThreadPool.QueueUserWorkItem(new WaitCallback(HandleCommand), stateObject);
     }
     else
     {
         Console.WriteLine("Unable to handle command type {0} - no associated handler", commandType);
     }
 }
Example #2
0
 public static void HandleDSCommand(DSCommandType commandType)
 {
     if (CommandMap.ContainsKey(commandType))
     {
         var handler = CommandMap[commandType];
         StateInfo stateObject = new StateInfo(handler);
         ThreadPool.QueueUserWorkItem(new WaitCallback(HandleCommand), stateObject);
     }
     else
     {
         Console.WriteLine("Unable to handle command type {0} - no associated handler", commandType);
     }
 }
Example #3
0
 public DSCommandMessage(DSCommandType type, string command)
 {
     this.CommandType = (int)type;
     this.Command     = command;
 }