TemplateAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義用來產生字串的範本。
[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 ,以查看提供的所有預設範本。 您可以在欄位層級的類別/結構表單上覆寫範本。 它們也支援在範本之間隨機選取,這是在您的響應中引進一些變化的好方法。
建構函式
| TemplateAttribute(TemplateAttribute) |
從另一個範本初始化。 |
| TemplateAttribute(TemplateUsage, String[]) |
指定要針對特定使用方式隨機選擇的一組範本。 |
欄位
| Usage |
這是什麼樣板。 |
屬性
| AllowDefault |
在 \ref 模式字串中處理選項 {||} 時,如果存在,請提供預設值的選項。 (繼承來源 TemplateBaseAttribute) |
| ChoiceCase |
在 \ref 模式字串中顯示 {||} 參考中的選擇時,控制案例。 (繼承來源 TemplateBaseAttribute) |
| ChoiceFormat |
在 \ref 模式字串中顯示 {||} 選項時,用來呈現每個選擇的格式字串。 (繼承來源 TemplateBaseAttribute) |
| ChoiceLastSeparator |
在 \ref 模式字串中使用 {||} 建構選擇的內嵌列表時,在最後選擇之前使用的字串串。 (繼承來源 TemplateBaseAttribute) |
| ChoiceParens |
在 \ref 模式字串中建構 {||} 的內嵌選擇列表時,會控制是否要在選擇中包含括號。 (繼承來源 TemplateBaseAttribute) |
| ChoiceSeparator |
在 \ref 模式字串中使用 {||} 建構內嵌列表時,在最後一個選項以外的所有選項之間使用字串。 (繼承來源 TemplateBaseAttribute) |
| ChoiceStyle |
如何在 \ref 模式字串中處理時顯示選項 {||} 。 (繼承來源 TemplateBaseAttribute) |
| Feedback |
控制使用者在每個輸入之後取得的回應類型。 (繼承來源 TemplateBaseAttribute) |
| FieldCase |
在 \ref 模式字串中顯示 {&} 域名參考時的控制案例。 (繼承來源 TemplateBaseAttribute) |
| IsLocalizable |
如果屬性可當地語系化,則為 True。 (繼承來源 FormFlowAttribute) |
| LastSeparator |
在 \ref 模式字串中使用 {[]} 建構列表時,在列表中最後一個值之前使用的字串。 (繼承來源 TemplateBaseAttribute) |
| Patterns |
所有可能的範本。 (繼承來源 TemplateBaseAttribute) |
| Separator |
在 \ref 模式字串中使用 {[]} 建構列表時,在最後一個值以外的所有值之間使用字串。 (繼承來源 TemplateBaseAttribute) |
| ValueCase |
在 \ref 模式字串中顯示 {} 值參考時的控制案例。 (繼承來源 TemplateBaseAttribute) |
方法
| ApplyDefaults(TemplateBaseAttribute) |
提供的任何預設值都會覆寫 |
| Pattern() |
使用 IPrompt<T>產生字串時要使用的模式。 (繼承來源 TemplateBaseAttribute) |