Пример #1
0
        public async Task <SpeechletResponse> OnIntentAsync(IntentRequest intentRequest, Session session, Context context)
        {
            await logHelper.Log($"{session.User.Id} in session {session.SessionId} asked for {intentRequest.Intent.Name}");

            IIntentHandler handler = handlers.TryGetValue(intentRequest.Intent.Name, out handler) ? handler : defaultHandler;

            return(await handler.OnIntentAsync(intentRequest, session));
        }
Пример #2
0
        public async Task <SpeechletResponse> OnLaunchAsync(LaunchRequest launchRequest, Session session, Context context)
        {
            await logHelper.Log($"User {session.User.Id} in session {session.SessionId} launched skill");

            return(await defaultHandler.OnIntentAsync(null, session));
        }