Templates 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.
Class for working with Language Generation templates.
public class Templates : System.Collections.Generic.List<Microsoft.Bot.Builder.LanguageGeneration.Template>
type Templates = class
inherit List<Template>
Public Class Templates
Inherits List(Of Template)
- Inheritance
Remarks
Templates.ParseFile(path) will load a .LG file . Templates.ParseText(text) will load language generation templates from text.
Constructors
Fields
InlineTemplateIdPrefix |
Temp Template ID prefix for inline content. |
Properties
AllDiagnostics |
Gets get all diagnostics from current lg file and reference lg files. |
AllTemplates |
Gets get all templates from current lg file and reference lg files. |
Content |
Gets or sets LG content. |
Diagnostics |
Gets or sets diagnostics. |
EnableFromFile |
Gets or sets a value indicating whether fromFile is allowed in LG templates. |
ExpressionParser |
Gets or sets expression parser. |
Id |
Gets or sets id of this LG file. |
ImportResolver |
Gets or sets delegate for resolving resource id of imported lg file. |
Imports |
Gets or sets import elements that this LG file contains directly. |
LgOptions |
Gets the evluation options for current LG file. |
NamedReferences |
Gets or sets map from import alias to templates. |
Namespace |
Gets the namespace to register for current LG file. |
Options |
Gets or sets lG file options. |
References |
Gets or sets all references that this LG file has from Imports. Notice: reference includes all child imports from the LG file, not only the children belong to this LG file directly. so, reference count may >= imports count. |
Source |
Gets or sets source of this LG file. |
Methods
AddTemplate(String, List<String>, String) |
Adds a new template and returns the updated Templates instance. |
AnalyzeTemplate(String, AnalyzerOptions) |
(experimental) Analyzes a template to get the static analyzer results including variables and template references. |
DeleteTemplate(String) |
Removes an existing template in current Templates instances. |
Equals(Object) | System.Collections.Generic.List`1.Equals(System.Object) |
Evaluate(String, Object, EvaluationOptions) |
Evaluate a template with given name and scope. |
EvaluateText(String, Object, EvaluationOptions) |
Evaluates an inline template string. |
ExpandTemplate(String, Object, EvaluationOptions) |
Expands a template with given name and scope. Return all possible responses instead of random one. |
GetHashCode() | System.Collections.Generic.List`1.GetHashCode |
ParseFile(String, ImportResolverDelegate, ExpressionParser) |
Parser to turn lg content into a Templates. |
ParseResource(LGResource, ImportResolverDelegate, ExpressionParser) |
Parser to turn lg content into a Templates. |
ParseText(String, String, ImportResolverDelegate, ExpressionParser) |
Obsolete.
Parser to turn lg content into a Templates. |
ToString() | System.Collections.Generic.List`1.ToString |
UpdateTemplate(String, String, List<String>, String) |
Updates an existing template in current Templates instance. |
Extension Methods
Dequeue<T>(List<T>) |
Removes first element of a queue. |