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
}