private bool CanPrint(CommandInfo commandInfo, Mode mode) { var previousCommands = new List<String>(); foreach (var previousCommand in commandInfo.PreviousCommandNames) { var command = _container.Resolve<ICommand>(previousCommand); if (command.CanPrint(mode)) previousCommands.Add(previousCommand); } return previousCommands.Where(x => !_commandsAlreadyRun.ContainsKey(x)).Count() == 0; }
public void RegisterCommand(int keyCode, CommandInfo commandInfo) { var response = _client.Post<CommandResponse>(String.Format("command/{0}", keyCode), commandInfo); }
public void RegisterCommand(int keyCode, CommandInfo commandInfo) { _commandInfos.Add(keyCode, commandInfo); }