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.
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:
Comments
Post a Comment