語言

TemplateAttribute 類別

定義

定義一個產生字串的範本。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=true)]
[System.Serializable]
public class TemplateAttribute : Microsoft.Bot.Builder.FormFlow.Advanced.TemplateBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=true)>]
[<System.Serializable>]
type TemplateAttribute = class
    inherit TemplateBaseAttribute
Public Class TemplateAttribute
Inherits TemplateBaseAttribute
繼承
屬性

備註

範本提供使用 \rEF範本中定義的範本語言的模式。 請參閱 TemplateUsage 所有不同範本的說明。 你也可以查看 Templates 所有提供的預設範本。 範本可以在欄位層級的表單、類別/結構層級被覆寫。 他們也支援隨機選擇範本,這是讓你的回答有些變化的好方法。

建構函式

名稱 Description
TemplateAttribute(TemplateAttribute)

從另一個範本初始化。

TemplateAttribute(TemplateUsage, String[])

指定一組範本,隨機選擇用於特定用途。

欄位

名稱 Description
Usage

這是什麼樣的範本。

屬性

名稱 Description
AllowDefault

在處理 \ref 模式字串中的 {||} 選擇時,若有預設值,請提供選項。

(繼承來源 TemplateBaseAttribute)
ChoiceCase

在 \rEF 模式字串中顯示 {||} 參考中的選擇時,控制情況。

(繼承來源 TemplateBaseAttribute)
ChoiceFormat

格式字串用於呈現每個選擇,顯示 \ref 模式字串中的 {||} 選項。

(繼承來源 TemplateBaseAttribute)
ChoiceLastSeparator

在構建使用 {||} 的 \ref 模式字串中的內聯選擇列表時,該字串是最後一個選擇之前使用的字串。

(繼承來源 TemplateBaseAttribute)
ChoiceParens

在 \r中構建 {||} 的內嵌選擇列表時ef pattern 字串控制是否要在選擇周圍加上括號。

(繼承來源 TemplateBaseAttribute)
ChoiceSeparator

在使用 {||} 建立 \ref 模式字串中的串列時,該字串在除最後一個選擇外的所有選擇間所用的字串。

(繼承來源 TemplateBaseAttribute)
ChoiceStyle

如何在 EF 圖案串中處理 {||} 選項時 \r

(繼承來源 TemplateBaseAttribute)
Feedback

控制使用者在每次輸入後收到的回饋。

(繼承來源 TemplateBaseAttribute)
FieldCase

控制情況:在 \ref 模式字串中顯示 {&} 欄位名稱參考。

(繼承來源 TemplateBaseAttribute)
IsLocalizable

如果屬性是可局部化的,那就成立。

(繼承來源 FormFlowAttribute)
LastSeparator

在構造 {[]} 的 \ref pattern 字串時,也就是在 list 最後一個值之前使用的字串。

(繼承來源 TemplateBaseAttribute)
Patterns

所有可能的範本。

(繼承來源 TemplateBaseAttribute)
Separator

在構造 {[]} 的 EF 模式字串 \r時,除了最後一個值外,所有值之間使用的字串。

(繼承來源 TemplateBaseAttribute)
ValueCase

在 EF 模式字串中顯示 {} 值參考時的控制情況 \r

(繼承來源 TemplateBaseAttribute)

方法

名稱 Description
ApplyDefaults(TemplateBaseAttribute)

此範本中的任何預設值都會被提供的 defaultTemplate。

(繼承來源 TemplateBaseAttribute)
Pattern()

產生字 IPrompt<T>串時應使用的模式。

(繼承來源 TemplateBaseAttribute)

適用於