PromptAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义询问字段时使用的提示。
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
[System.Serializable]
public class PromptAttribute : Microsoft.Bot.Builder.FormFlow.Advanced.TemplateBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
[<System.Serializable>]
type PromptAttribute = class
inherit TemplateBaseAttribute
Public Class PromptAttribute
Inherits TemplateBaseAttribute
- 继承
- 属性
注解
默认情况下,提示将来自 \ref Templates。 此属性允许你使用一个多一个 \ref 模式字符串替代此字符串。 实际提示将从你提供的替代项中随机选择。
构造函数
PromptAttribute(String[]) |
使用一个或多个 \ref 模式定义提示,以便随机选择。 |
PromptAttribute(TemplateAttribute) |
基于 TemplateAttribute定义提示。 |
属性
AllowDefault |
处理 \ref 模式字符串中的选项 {||} 时,请提供默认值(如果存在)的选项。 (继承自 TemplateBaseAttribute) |
ChoiceCase |
在 \ref patterns 字符串中显示 {||} 引用中的选项时,控制大小写。 (继承自 TemplateBaseAttribute) |
ChoiceFormat |
在 \ref 模式字符串中显示 {||} 选项时,用于显示每个选项的格式字符串。 (继承自 TemplateBaseAttribute) |
ChoiceLastSeparator |
在 \ref 模式字符串中使用 {||} 构造内联选项列表时,在最后一个选项之前使用的字符串。 (继承自 TemplateBaseAttribute) |
ChoiceParens |
在 \ref 模式中为 {||} 构造内联选项列表时,字符串控制是否在选项周围包含括号。 (继承自 TemplateBaseAttribute) |
ChoiceSeparator |
在 \ref 模式字符串中使用 {||} 构造内联列表时,在除最后一个选项之外的所有选项之间使用的字符串。 (继承自 TemplateBaseAttribute) |
ChoiceStyle |
在 \ref 模式字符串中处理时如何显示选项 {|}。 (继承自 TemplateBaseAttribute) |
Feedback |
控制用户在每次输入后获得的反馈类型。 (继承自 TemplateBaseAttribute) |
FieldCase |
在 \ref 模式字符串中显示 {&} 字段名称引用时,控制大小写。 (继承自 TemplateBaseAttribute) |
IsLocalizable |
如此 如果属性是可本地化的。 (继承自 FormFlowAttribute) |
LastSeparator |
在 \ref 模式字符串中使用 {[]} 构造列表时,在列表中的最后一个值之前使用的字符串。 (继承自 TemplateBaseAttribute) |
Patterns |
所有可能的模板。 (继承自 TemplateBaseAttribute) |
Separator |
在 \ref 模式字符串中使用 {[]} 构造列表时,在除最后一个之外的所有值之间使用的字符串。 (继承自 TemplateBaseAttribute) |
ValueCase |
在 \ref 模式字符串中显示 {} 值引用时的控制用例。 (继承自 TemplateBaseAttribute) |
方法
ApplyDefaults(TemplateBaseAttribute) |
提供的 将覆盖 |
Pattern() |
使用 IPrompt<T>生成字符串时要使用的模式。 (继承自 TemplateBaseAttribute) |