Exemplo n.º 1
0
        private static void DispatchRandomChaos(object obj, System.Timers.ElapsedEventArgs e)
        {
            var random      = new Random();
            var index       = random.Next(PossibleCommands.Count());
            var commandType = PossibleCommands.ElementAt(index);

            DSCommandHandler.HandleDSCommand(commandType);
        }
Exemplo n.º 2
0
 public static void Dispatch(string command)
 {
     if (CommandMap.ContainsKey(command))
     {
         var commandType = CommandMap[command];
         DSCommandHandler.HandleDSCommand(commandType);
     }
     else
     {
         Console.WriteLine("Unable to handle command {0} - not found", command);
     }
 }