コード例 #1
0
ファイル: LuisManager.cs プロジェクト: TChag/LUISTrainingDemo
        /// <summary>
        /// Adds default context providers, entity resolvers and intent handlers.
        /// </summary>
        protected virtual void AddDefaultStrategies()
        {
            // Default Resolvers
            EntityResolvers.Add(new EntityMetadataResolver());

            // Default Handlers
            IntentHandlers.Add(new ResolvedIntentForwarder());
        }
コード例 #2
0
        private AlexaResponse IntentRequestHandler(Request request)
        {
            AlexaResponse response = null;

            switch (request.Intent)
            {
            case AlexaIntents.Showbiointent:
                response = IntentHandlers.ShowBioIntentHandler(request);
                break;

            case AlexaIntents.Newproductsintent:
                response = IntentHandlers.NewProductsIntentHandler(request);
                break;

            case AlexaIntents.Topproductsintent:
                response = IntentHandlers.TopProductsIntentHandler(request);
                break;

            case AlexaIntents.AmazonCancelintent:
            case AlexaIntents.AmazonStopintent:
                response = IntentHandlers.CancelOrStopIntentHandler(request);
                break;

            case AlexaIntents.AmazonHelpintent:
                response = IntentHandlers.HelpIntent(request);
                break;

            case AlexaIntents.ShowMyBasketintent:
                response = IntentHandlers.ShowMyBasketintentHandler(request);
                break;

            case AlexaIntents.Whereistheorderintent:
                response = IntentHandlers.WhereIsTheOrderIntentHandler(request);
                break;

            case AlexaIntents.AddProductToCartintent:
                response = IntentHandlers.AddProductToCartIntentHandler(request);
                break;

            case AlexaIntents.PickAWinnerintent:

                response = IntentHandlers.PickAWinnerIntentHandler(request);
                break;
            }

            return(response);
        }
コード例 #3
0
        private AlexaResponse LaunchRequestHandler(Request request)
        {
            var response = IntentHandlers.LaunchRequestIntentHandler(request);

            return(response);
        }
コード例 #4
0
 /// <summary>
 /// Adds default context providers, entity resolvers and intent handlers.
 /// </summary>
 protected virtual void AddDefaultStrategies()
 {
     // Default Handlers
     IntentHandlers.Add(new ResolvedIntentForwarder());
 }