예제 #1
0
 public async Task HandleRequest()
 {
     await RequestProcessManager.ProcessRequest($"{CustomRequest.CustomIntent}", async() =>
     {
         await Task.Run(() =>
         {
         });
     });
 }
 public async Task HandleRequest()
 {
     await RequestProcessManager.ProcessRequest($"{BuiltInRequest.SessionEndedRequest}", async () =>
     {
         await Task.Run(() =>
         {
             Logger.Write("Session expired");
         });
     });
 }
 public async Task HandleRequest()
 {
     await RequestProcessManager.ProcessRequest($"{BuiltInRequest.LaunchRequest}", async() =>
     {
         await Task.Run(() =>
         {
             State.NumPlayed++;
             State.NumPrompted = 0;
         });
     });
 }
        public async Task HandleRequest()
        {
            await RequestProcessManager.ProcessRequest($"{BuiltInRequest.FallbackIntent}", async() =>
            {
                await Task.Run(() =>
                {
                    State.NumPrompted++;

                    if (State.NumPrompted % 3 == 0)
                    {
                        Response.SetSpeech(true, false,
                                           SpeechManager.GetNotUnderstandSpeech() + SpeechManager.GetForcedEndSpeech());
                    }
                    else
                    {
                        Response.SetSpeech(false, false,
                                           SpeechManager.GetNotUnderstandSpeech() + SpeechManager.GetTryAgainSpeech() + SpeechManager.GetWhatWouldYouSpeech(),
                                           SpeechManager.GetShortHelpSpeech() + SpeechManager.GetWhatWouldYouSpeech());
                    }
                });
            });
        }