public async Task ForecastIntent3(IDialogContext context, IAwaitable <string> result)
        {
            state = await result;
            WeatherForecast wf = new WeatherForecast();
            RootObject      ro = new RootObject();

            ro = wf.getForecast(city, state);
            Attachment attachment = new Attachment();

            attachment = wf.GetAdaptiveCard(ro);
            var reply = context.MakeMessage();

            reply.Attachments.Add(attachment);
            await context.PostAsync(reply);
        }
 public async Task ForecastIntent1(IDialogContext context, LuisResult result)
 {
     city  = null;
     state = null;
     foreach (var entity in result.Entities)
     {
         if (entity.Type == "city")
         {
             city = entity.Entity;
         }
         else if (entity.Type == "state")
         {
             state = entity.Entity;
         }
     }
     if (city == null)
     {
         PromptDialog.Text(
             context,
             ForecastIntent2,
             "Please enter the name of the city (Example: Detroit, New York)"
             );
     }
     else
     {
         if (state == null)
         {
             PromptDialog.Text(
                 context,
                 ForecastIntent3,
                 "Please enter the name of the state (Example: Michigan, New York)"
                 );
         }
         else
         {
             WeatherForecast wf = new WeatherForecast();
             RootObject      ro = new RootObject();
             ro = wf.getForecast(city, state);
             Attachment attachment = new Attachment();
             attachment = wf.GetAdaptiveCard(ro);
             var reply = context.MakeMessage();
             reply.Attachments.Add(attachment);
             await context.PostAsync(reply);
         }
     }
 }
 public async Task ForecastIntent2(IDialogContext context, IAwaitable <string> result)
 {
     city = await result;
     if (state == null)
     {
         PromptDialog.Text(
             context,
             ForecastIntent3,
             "Please enter the name of the state (Example: Michigan, New York)"
             );
     }
     else
     {
         WeatherForecast wf = new WeatherForecast();
         RootObject      ro = new RootObject();
         ro = wf.getForecast(city, state);
         Attachment attachment = new Attachment();
         attachment = wf.GetAdaptiveCard(ro);
         var reply = context.MakeMessage();
         reply.Attachments.Add(attachment);
         await context.PostAsync(reply);
     }
 }