DateTimePrompt 建構函式

定義

初始化 DateTimePrompt 類別的新執行個體。

public DateTimePrompt (string dialogId, Microsoft.Bot.Builder.Dialogs.PromptValidator<System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.DateTimeResolution>> validator = default, string defaultLocale = default);
new Microsoft.Bot.Builder.Dialogs.DateTimePrompt : string * Microsoft.Bot.Builder.Dialogs.PromptValidator<System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.DateTimeResolution>> * string -> Microsoft.Bot.Builder.Dialogs.DateTimePrompt
Public Sub New (dialogId As String, Optional validator As PromptValidator(Of IList(Of DateTimeResolution)) = Nothing, Optional defaultLocale As String = Nothing)

參數

dialogId
String

要指派給這個提示的識別碼。

validator
PromptValidator<IList<DateTimeResolution>>

選擇性的 , PromptValidator<T> 其中包含此提示的其他自訂驗證。

defaultLocale
String

選擇性的預設地區設定,用來判斷提示的語言特定行為。 地區設定是 2、3 或 4 個字元的 ISO 639 代碼,其代表某個語言或語言系列。

備註

的值 dialogId 在 或 中 DialogSet 必須是唯一的,提示 ComponentDialog 要加入至其中。

Locale如果已指定 . Context . ActivityDialogContext ,則會使用該本機來判斷語言特定行為,否則 defaultLocale 會使用 。 如果沒有語言或預設地區設定可用,或是不支援語言或地區設定,則會使用US-English。

適用於