コード例 #1
0
        private void RelationSelected(string str, IDialogContext ctx)
        {
            _currentRelationId = LabelService.GetIdentifier(str);

            var options = _relationActions.Keys;

            PromptDialog.Choice(ctx, RelationActionSelected, options, "What to do with this relation?");

            async Task RelationActionSelected(IDialogContext context, IAwaitable <string> result)
            {
                var action = _relationActions[await result];

                action(context);
            }
        }
コード例 #2
0
 private async Task EdgeSelected(IDialogContext context, IAwaitable <string> result)
 {
     _value.EdgeId = LabelService.GetIdentifier(await result);
     PromptDialog.Choice(context, ToNodeSelected, _nodes, "To what node do you want to go?L");
 }
コード例 #3
0
 private async Task ToNodeSelected(IDialogContext context, IAwaitable <string> result)
 {
     _value.ToNodeId = LabelService.GetIdentifier(await result);
     context.Done(_value);
 }
コード例 #4
0
 private async Task FromNodeSelected(IDialogContext context, IAwaitable <string> result)
 {
     _value.FromNodeId = LabelService.GetIdentifier(await result);
     PromptDialog.Choice(context, EdgeSelected, _edges, "With what edge do you want to go?");
 }