IFormBuilder<T>.Field 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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。
備註
你可以自己提供實作, IField<T> 或者用這個 Field<T> 類別來提供流暢值,或 FieldReflector<T> 用 Echoion 或 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。