IFormBuilder<T>.Field 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Field(IField<T>) |
通过提供你自己的场定义来细化场步骤。 |
| Field(String, ActiveDelegate<T>, ValidateAsyncDelegate<T>) |
定义一个步骤,用于在表单状态中填写特定值。 |
| Field(String, PromptAttribute, ActiveDelegate<T>, ValidateAsyncDelegate<T>) |
定义一个步骤,用于在表单状态中填写特定值。 |
| Field(String, String, ActiveDelegate<T>, ValidateAsyncDelegate<T>) |
定义一个步骤,用于在表单状态中填写特定值。 |
Field(IField<T>)
通过提供你自己的场定义来细化场步骤。
public Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field(Microsoft.Bot.Builder.FormFlow.Advanced.IField<T> field);
abstract member Field : Microsoft.Bot.Builder.FormFlow.Advanced.IField<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Function Field (field As IField(Of T)) As IFormBuilder(Of T)
参数
- field
- IField<T>
使用场定义。
返回
修改版IFormBuilder。
注解
你可以自己实现 JSON IField<T> ,或者用 Field<T> Flowent 值 FieldReflector<T> ,用 Reflection 或 Json.FieldJson 来用 JSON Schema。
适用于
Field(String, ActiveDelegate<T>, ValidateAsyncDelegate<T>)
定义一个步骤,用于在表单状态中填写特定值。
public Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field(string name, Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> active = default, Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate = default);
abstract member Field : string * Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> * Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Function Field (name As String, Optional active As ActiveDelegate(Of T) = Nothing, Optional validate As ValidateAsyncDelegate(Of T) = Nothing) As IFormBuilder(Of T)
参数
- name
- String
表单状态下的路径,就是被填充的值。
- active
- ActiveDelegate<T>
委托给测试表格州,看看步骤是否激活。
- validate
- ValidateAsyncDelegate<T>
委托验证字段值。
返回
修改版IFormBuilder。
适用于
Field(String, PromptAttribute, ActiveDelegate<T>, ValidateAsyncDelegate<T>)
定义一个步骤,用于在表单状态中填写特定值。
public Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field(string name, Microsoft.Bot.Builder.FormFlow.PromptAttribute prompt, Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> active = default, Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate = default);
abstract member Field : string * Microsoft.Bot.Builder.FormFlow.PromptAttribute * Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> * Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Function Field (name As String, prompt As PromptAttribute, Optional active As ActiveDelegate(Of T) = Nothing, Optional validate As ValidateAsyncDelegate(Of T) = Nothing) As IFormBuilder(Of T)
参数
- name
- String
表单状态下的路径,就是被填充的值。
- prompt
- PromptAttribute
提示模式,带有更多格式控制,用于描述字段的提示。
- active
- ActiveDelegate<T>
授权给测试表单州,看看步骤是否激活。
- validate
- ValidateAsyncDelegate<T>
委托验证字段值。
返回
修改版IFormBuilder。
适用于
Field(String, String, ActiveDelegate<T>, ValidateAsyncDelegate<T>)
定义一个步骤,用于在表单状态中填写特定值。
public Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field(string name, string prompt, Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> active = default, Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate = default);
abstract member Field : string * string * Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> * Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Function Field (name As String, prompt As String, Optional active As ActiveDelegate(Of T) = Nothing, Optional validate As ValidateAsyncDelegate(Of T) = Nothing) As IFormBuilder(Of T)
参数
- name
- String
表单状态下的路径,就是被填充的值。
- prompt
- String
简单的 \rEF 模式来描述场内提示。
- active
- ActiveDelegate<T>
授权给测试表单州,看看步骤是否激活。
- validate
- ValidateAsyncDelegate<T>
委托验证字段值。
返回
修改版IFormBuilder。