Пример #1
0
        public override Task <DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var arg1 = Arg1.GetValue(dc.State);
            var arg2 = Arg2.GetValue(dc.State);

            var result = Convert.ToInt32(arg1) * Convert.ToInt32(arg2);

            if (this.ResultProperty != null)
            {
                dc.State.SetValue(this.ResultProperty.GetValue(dc.State), result);
            }

            return(dc.EndDialogAsync(result: result, cancellationToken: cancellationToken));
        }