Redigera

Dela via


Template class

Here is a data model that can easily understanded and used as the context or all kinds of visitors wether it's evalator, static checker, anayler.. etc

Constructors

Template(string, string[], string, SourceRange)

Creates a new instance of the Template class.

Properties

body

Text format of Body of this template. All content except Name and Parameters.

name

Name of the template, what's followed by '#' in a LG file

parameters

Parameter list of this template

properties

The extended properties for the object.

sourceRange

Source of this template

templateBodyParseTree

Parse tree of this template.

Methods

toString()

Returns a string representing the current Template object.

Constructor Details

Template(string, string[], string, SourceRange)

Creates a new instance of the Template class.

new Template(templatename: string, parameters: string[], templatebody: string, sourceRange: SourceRange)

Parameters

templatename

string

Template name without parameters.

parameters

string[]

Parameter list.

templatebody

string

Template content.

sourceRange
SourceRange

(xref:botbuilder-lg.SourceRange) of template.

Property Details

body

Text format of Body of this template. All content except Name and Parameters.

body: string

Property Value

string

name

Name of the template, what's followed by '#' in a LG file

name: string

Property Value

string

parameters

Parameter list of this template

parameters: string[]

Property Value

string[]

properties

The extended properties for the object.

properties?: Record<string, unknown>

Property Value

Record<string, unknown>

sourceRange

Source of this template

sourceRange: SourceRange

Property Value

templateBodyParseTree

Parse tree of this template.

templateBodyParseTree: BodyContext

Property Value

Method Details

toString()

Returns a string representing the current Template object.

function toString(): string

Returns

string

A string representing the Template.