語言

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指定 的ActivityDialogContextContext,則該 local 用於判斷語言特定行為;否則使用 。defaultLocale 如果沒有語言或預設地區設定可用,或是不支援語言或地區設定,則會使用 US-English。

適用於