c# - How call Dialog from FormFlow -


how call dialog in middle of form? call location dialog https://github.com/microsoft/botbuilder-location address. thanks.

[serializable] public class issueshares {     [prompt("please enter holder name:")]     public string holdername;     [prompt("please enter holder address:")]    **[call(typeof(addressdialog))]**     public address address;      [prompt("enter shares class:")]     public string sharesclass { get; set; }     [prompt("how many shares issue?")]     [describe("number of shares")]     public int numberofshares { get; set; } }  [serializable] public class addressdialog : idialog<address> {     public task startasync(idialogcontext context)     {         context.wait(messagereceived);         return task.completedtask;     }      private async task messagereceived(idialogcontext context, iawaitable<object> result)     {         // logic         context.done(address);     } } 

are expecting solution based on attribute declaration or regular code acceptable?

microsoft offers dialog chaining invoked sequence or stack.

the accepted answer in follow question answers question think.

calling forms dialogs

here code extract answer:

var myform = new formdialog<createnewleadform>(new createnewleadform(), createnewleadform.buildform, formoptions.promptinstart, null);  context.call<createnewleadform>(myform, formcompletecallback); 

another question discusses subject in more general:

handling multiple dialogs in microsoft bot framework


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -