TemplateAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Define a template for generating strings.
[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
- Inheritance
- Attributes
Remarks
Templates provide a pattern that uses the template language defined in \ref patterns. See TemplateUsage to see a description of all the different kinds of templates. You can also look at Templates to see all the default templates that are provided. Templates can be overriden at the form, class/struct of field level. They also support randomly selecting between templates which is a good way to introduce some variation in your responses.
Constructors
TemplateAttribute(TemplateAttribute) |
Initialize from another template. |
TemplateAttribute(TemplateUsage, String[]) |
Specify a set of templates to randomly choose between for a particular usage. |
Fields
Usage |
What kind of template this is. |
Properties
AllowDefault |
When processing choices {||} in a \ref patterns string, provide a choice for the default value if present. (Inherited from TemplateBaseAttribute) |
ChoiceCase |
Control case when showing choices in {||} references in a \ref patterns string. (Inherited from TemplateBaseAttribute) |
ChoiceFormat |
Format string used for presenting each choice when showing {||} choices in a \ref patterns string. (Inherited from TemplateBaseAttribute) |
ChoiceLastSeparator |
When constructing inline lists of choices using {||} in a \ref patterns string, the string used before the last choice. (Inherited from TemplateBaseAttribute) |
ChoiceParens |
When constructing inline choice lists for {||} in a \ref patterns string controls whether to include parentheses around choices. (Inherited from TemplateBaseAttribute) |
ChoiceSeparator |
When constructing inline lists using {||} in a \ref patterns string, the string used between all choices except the last. (Inherited from TemplateBaseAttribute) |
ChoiceStyle |
How to display choices {||} when processed in a \ref patterns string. (Inherited from TemplateBaseAttribute) |
Feedback |
Control what kind of feedback the user gets after each input. (Inherited from TemplateBaseAttribute) |
FieldCase |
Control case when showing {&} field name references in a \ref patterns string. (Inherited from TemplateBaseAttribute) |
IsLocalizable |
True if attribute is localizable. (Inherited from FormFlowAttribute) |
LastSeparator |
When constructing lists using {[]} in a \ref patterns string, the string used before the last value in the list. (Inherited from TemplateBaseAttribute) |
Patterns |
All possible templates. (Inherited from TemplateBaseAttribute) |
Separator |
When constructing lists using {[]} in a \ref patterns string, the string used between all values except the last. (Inherited from TemplateBaseAttribute) |
ValueCase |
Control case when showing {} value references in a \ref patterns string. (Inherited from TemplateBaseAttribute) |
Methods
ApplyDefaults(TemplateBaseAttribute) |
Any default values in this template will be overridden by the supplied |
Pattern() |
The pattern to use when generating a string using IPrompt<T>. (Inherited from TemplateBaseAttribute) |