private void LogSessionStart(SkillRequest request) { LOGGER.log.INFO("BEGIN", "-----------------------------------------------------------------------"); string skillRequest = JsonConvert.SerializeObject(request, Formatting.Indented); LOGGER.log.DEBUG("INPUT RECEIVED: ", skillRequest); LOGGER.log.INFO("Function", "USERID: " + request.Session.User.UserId); LOGGER.log.DEBUG("Function", "REQUEST TYPE: " + request.Request.Type); LOGGER.log.DEBUG("Function", "DisplaySupported: " + request.APLSupported()); }
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); }