Ejemplo n.º 1
0
        private async Task WeatherReport(IDialogContext context, IAwaitable <LuisResult> result)
        {
            var luisresult = await result;
            EntityRecommendation _location;
            var          reply = context.MakeMessage();
            YahooWeather yw    = new YahooWeather();

            if (luisresult.TryFindEntity("Weather.Location", out _location))
            {
                await yw.GetWeatherFromYahoo(context, _location.Entity.ToString());

                context.Done(true);
            }
            else
            {
                await context.Forward(new NoneDialog(), this.WeatherAfterAsync, result, System.Threading.CancellationToken.None);
            }
        }