示例#1
0
 internal ITemplate GetTemplate(string templateText, IDictionary <string, object?> variableTemplate, string templateName, string?templatePath)
 {
     Settings.IsReadOnly = true;
     return(Settings.DynamicTemplates ?
            (ITemplate)DynamicTemplate.LoadTemplate(this, templateText, templateName, templatePath) :
            CompiledTemplate.LoadTemplate(this, templateText, variableTemplate, templateName, templatePath));
 }
示例#2
0
 internal DynamicTemplate GetDynamicTemplate(string templateText, string?templateName, string?templatePath)
 {
     Settings.IsReadOnly = true;
     if (Settings.DynamicTemplates == false)
     {
         throw new NotImplementedException();
     }
     return(DynamicTemplate.LoadTemplate(this, templateText, templateName, templatePath));
 }