Skip to content

Instantly share code, notes, and snippets.

@andz88
Created October 10, 2016 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andz88/4ff0b35728fb08286678aec1870bae24 to your computer and use it in GitHub Desktop.
Save andz88/4ff0b35728fb08286678aec1870bae24 to your computer and use it in GitHub Desktop.
public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
{
if (activity.Type == ActivityTypes.Message)
{
// Initiates the form flow
await Conversation.SendAsync(activity, MakeRootDialog);
}
else
{
HandleSystemMessage(activity);
}
var response = Request.CreateResponse(HttpStatusCode.OK);
return response;
}
internal static IDialog<CarInquiryFormFlow> MakeRootDialog()
{
return Chain.From(() => FormDialog.FromForm(CarInquiryFormFlow.BuildForm));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment