Ejemplo n.º 1
0
        private async Task ProcessCustomerChoice(string entity)
        {
            if (!string.IsNullOrEmpty(entity))
            {
                // cancel pending prompts
                this.allowSendingOffMsg = false;
                // route customer
                string direction = ProductCatalog.GetDirectionFromLuisEntity(entity);

                if (direction == "left")
                {
                    if (this.ViewModel.Update(DemoScreenState.LeftSelected))
                    {
                        await SpeakWithDelay(this.ViewModel.CustomerPrompt);
                    }
                }
                else if (direction == "right")
                {
                    if (this.ViewModel.Update(DemoScreenState.RightSelected))
                    {
                        await SpeakWithDelay(this.ViewModel.CustomerPrompt);
                    }
                }
            }
        }