Formflow中的枚举选项的自定义消息-C#Bot Framework [英] Custom message for enum options in formflow - C# Bot Framework

查看:87
本文介绍了Formflow中的枚举选项的自定义消息-C#Bot Framework的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MS Bot框架,但找不到表单流中的枚举选项的自定义消息的方法.我已经尝试过使用提示属性,但是它不起作用.

I am working with MS bot framework and I can't find way to custom message for enum options in form flow. I have tried with prompt attribute but it doesn't work.

我想要的是:bot将为用户显示选项,例如:

What I want is: bot will show options for user like:

1)是的,我想成为DayNinja!

1) Yes, I want to be a DayNinja!

2)不,我不想释放流量来实现自己的目标.

2) No, I don't want to unlock flow to achieve my goals.

3)稍后,我将从基础知识开始

3) Later, I'll start with the basics

现在,我得到的是:是",否",以后"

Now, All I get are: "Yes", "No", "Later"

任何帮助将不胜感激 谢谢!

Any help will be appreciated Thank you!

推荐答案

您使用了错误的属性.代替使用Prompt属性,您需要使用Describe一个.

You are using the wrong attribute. Instead of using the Prompt attribute, you need to use the Describe one.

public enum OpeningHubOptions
{
    [Describe("Yes, I want to be a DayNinja")]
    Yes = 1,

    [Describe("No, I don't want to unlock flow to achieve my goals.")]
    No = 2,

    [Describe("Later, I''ll start with the basics")]
    Later = 3
}

这篇关于Formflow中的枚举选项的自定义消息-C#Bot Framework的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆