/// <summary> /// Expand a template with given name and scope. /// Return all possible responses instead of random one. /// </summary> /// <param name="templateName">Template name to be evaluated.</param> /// <param name="scope">The state visible in the evaluation.</param> /// <returns>Expand result.</returns> public IList <string> ExpandTemplate(string templateName, object scope = null) { CheckErrors(); var expander = new Expander(AllTemplates.ToList(), ExpressionEngine); return(expander.EvaluateTemplate(templateName, new CustomizedMemory(scope))); }
/// <summary> /// Expand a template with given name and scope. /// Return all possible responses instead of random one. /// </summary> /// <param name="templateName">Template name to be evaluated.</param> /// <param name="scope">The state visible in the evaluation.</param> /// <returns>Expand result.</returns> public List <string> ExpandTemplate(string templateName, object scope = null) { var expander = new Expander(Templates, this.expressionEngine); return(expander.EvaluateTemplate(templateName, scope)); }