DictionaryRenderer 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.
This is a simple template engine which has a resource map of template functions let myTemplates = { "en" : { "templateId": (context, data) => $"your name is {data.name}", "templateId": (context, data) => { return new Activity(); } }` } } To use, simply register with templateManager templateManager.Register(new DictionaryRenderer(myTemplates)).
public class DictionaryRenderer : Microsoft.Bot.Builder.TemplateManager.ITemplateRenderer
type DictionaryRenderer = class
interface ITemplateRenderer
Public Class DictionaryRenderer
Implements ITemplateRenderer
- Inheritance
-
DictionaryRenderer
- Implements
Constructors
| DictionaryRenderer(LanguageTemplateDictionary) |
Initializes a new instance of the DictionaryRenderer class. |
Methods
| RenderTemplate(ITurnContext, String, String, Object) |
Renders a template to an activity or string. |