Exemplo n.º 1
0
        public async Task FunctionHandler(DynamoDBEvent dynamoEvent, ILambdaContext context)
        {
            LOGGER.log       = MoycaLogger.GetLogger(context, LogLevel.TRACE);
            scopeAndSequence = new ScopeAndSequenceDB(LOGGER.log);
            dictionary       = new DictionaryDB(LOGGER.log);
            int i;

            for (i = 1057; i < 1058; i++)
            {
                await GetAndSetWords(i);
            }
            LOGGER.log.INFO("Function", "Words in range: " + totalWords);
        }
Exemplo n.º 2
0
        public async Task <SkillResponse> FunctionHandler(SkillRequest request, ILambdaContext context)
        {
            string requestType = request.Request.Type;

            LOGGER.log = MoycaLogger.GetLogger(context, LogLevel.TRACE);
            AlexaResponse.SetDisplaySupported(request.APLSupported());
            LogSessionStart(request);


            switch (requestType)
            {
            case "LaunchRequest":
                LOGGER.log.DEBUG("Function", "Launch Request");
                response = await new LaunchRequest(request).HandleRequest();
                break;

            case "IntentRequest":
                LOGGER.log.DEBUG("Function", "Intent Request");
                response = await new IntentRequest(request).HandleRequest();
                break;

            case "SessionEndedRequest":
                LOGGER.log.DEBUG("Function", "Session Ended Request");
                response = await new SessionEnded().HandleRequest();
                break;

            case "Connections.Response":
                LOGGER.log.DEBUG("Function", "Connection Response ");
                response = await new Connection(request).HandleRequest();
                break;

            default:
                LOGGER.log.DEBUG("Function", "Default Error Request");
                response = AlexaResponse.Say("Error");
                break;
            }

            return(response);
        }