Esempio n. 1
0
 public CommandResponse ProcessCommand(CommandRequest commandRequest)
 {
     var r = new Request(commandRequest.Command, _myUser, _myBot);
     var res = _myBot.Chat(r);
     var whatToDo = res.user.Predicates.grabSetting("whattodo");
     var ret = _myBot.Chat(new Request("DO", _myUser, _myBot));
     var processor = _commandProcessorFactory.GetCommandProcessor(commandRequest);
     return processor.ProcessCommand(commandRequest);
 }
        public CommandResponse ProcessCommand(CommandRequest commandRequest)
        {
            var network = new InsteonNetwork();
            var connection = new InsteonConnection(InsteonConnectionType.Net, "");
            network.Connect(connection);
            
            
            return new CommandResponse();

        }
        public ICommandProcessor GetCommandProcessor(CommandRequest commandRequest)
        {
            switch (commandRequest.Category)
            {
                case CommandCategoryEnum.Email:
                    return _emailCommandProcessor;
            }
            return new InsteonCommandProcessor();

        }
Esempio n. 4
0
        public CommandResponse ProcessCommand(CommandRequest commandRequest)
        {

            if (commandRequest.Command == "GetEmails")
            {
                var getEmailRequest = new GetEmailRequest
                {
                    EmailProtocol = EmailProtocolEnum.Imap,
                    HostName = "pop.gmail.com",
                    UserName = "******",
                    Password = "******"
                };
                var emailResponse = _emailHandler.GetEmail(getEmailRequest);
                return GetCommandResponse(emailResponse);
            }
            return new CommandResponse();
        }
 public EmailCommandInterpetation InterpretCommand(CommandRequest commandRequest)
 {
     return new EmailCommandInterpetation();
 }