コード例 #1
0
        public async Task Cheap(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            string chosenPlan;

            if (context.ConversationData.TryGetValue("ChosenPlanName", out chosenPlan))
            {
                await Miscellany.InsertDelayAsync(context);

                await context.PostAsync("I understand that for you price is important.");

                desiredFeature = EIntents.Cheap;
                await ProcessNeedOrFeatureAsync(context, result);
            }
            else
            {
                await Miscellany.InsertDelayAsync(context);

                await context.PostAsync("I understand that price is an important thing for you, but this will depend on what plan you take it with.  Lets work the plan out first then and come back to the phone.");

                desiredFeature = EIntents.Cheap;
                res            = result;
                context.Call(new PlanNode(), ProcessAfterPlanAsync);
            }
        }
コード例 #2
0
        public async Task FeaturePhone(IDialogContext context, LuisResult result)
        {
            EIntents old = desiredFeature;

            await ShowDebugInfoAsync(context, result);

            decoder.FeatureOrSmartPhoneDecision = true;
            desiredFeature = EIntents.FeaturePhone;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #3
0
        public async Task FaceID(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is the presence of Face ID recognition");
            }
            desiredFeature = EIntents.FaceID;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #4
0
        public async Task ExpandableMemory(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that an expandable memory is the most important thing for you");
            }
            desiredFeature = EIntents.ExpandableMemory;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #5
0
        public async Task DualSIM(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I undertand that you would like a phone with DualSIM");
            }
            desiredFeature = EIntents.DualSIM;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #6
0
        public async Task BatteryLife(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand you want a big battery life");
            }
            desiredFeature = EIntents.BatteryLife;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #7
0
        public async Task BandWidth(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that you want a phone with access to internet and with wide bandwidth");
            }
            desiredFeature = EIntents.BandWidth;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #8
0
        public async Task HDVoice(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is the presence of High Definition voice");
            }
            desiredFeature = EIntents.HDVoice;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #9
0
        public async Task HighResDisplay(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is a High resolution display");
            }
            desiredFeature = EIntents.HighResDisplay;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #10
0
        public async Task Newest(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understant that you want a recent model");
            }
            desiredFeature = EIntents.Newest;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #11
0
        public async Task WaterResist(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is that your phone should be water resistant");
            }
            desiredFeature = EIntents.WaterResist;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #12
0
        public async Task Color(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is the color");
            }
            desiredFeature = EIntents.Color;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #13
0
        public async Task SecondaryCamera(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is the presence of a secondary camera");
            }
            desiredFeature = EIntents.SecondaryCamera;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #14
0
        public async Task ScreenSize(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you on a phone is the screen size");
            }
            desiredFeature = EIntents.ScreenSize;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #15
0
        public async Task OS(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you in a phone is the operating System");
            }
            desiredFeature = EIntents.OS;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #16
0
        public async Task LargeStorage(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is a phone with a large storage capability");
            }
            desiredFeature = EIntents.LargeStorage;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #17
0
        public async Task SmartPhone(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you is to have a smartphone, not a feature phone");
            }
            desiredFeature = EIntents.SmartPhone;
            decoder.FeatureOrSmartPhoneDecision = true;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #18
0
        public async Task None(IDialogContext context, LuisResult result)
        {
            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I could not understand that, I'm afraid");
            }
            if (!askingAboutFeaturePhones)
            {
                desiredFeature = EIntents.None;
            }

            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #19
0
        public async Task Small(IDialogContext context, LuisResult result)
        {
            string currentModel;


            if (!context.ConversationData.TryGetValue("HandsetModelKey", out currentModel))
            {
                currentModel = "It's not there";
            }

            await ShowDebugInfoAsync(context, result);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("I understand that the most important thing for you are the dimensions of your new phone");
            }
            await context.PostAsync("Your current phone is " + currentModel);

            desiredFeature = EIntents.Small;
            await ProcessNeedOrFeatureAsync(context, result);
        }
コード例 #20
0
 private void RecoverContext()
 {
     desiredFeature      = desiredFeature2;
     desiredFeatureScore = desiredFeatureScore2;
     res = res2;
 }