Example #1
0
 public string Evaluate(Template template, Dictionary<string, object> variables)
 {
     using (var scope = new TemplateScope(this, template, variables))
     {
         EvaluateInternal(scope, null, null);
         return scope.GetContentsOfSection(TemplateScope.DefaultSection);
     }
 }
Example #2
0
 public string Evaluate(Template template)
 {
     return Evaluate(template, null);
 }
 public static void AssociateInstance(Exception exception, Template template, int executableLine)
 {
     exception.Data[_dataKey] = new FlatironExceptionData(template, executableLine);
 }
Example #4
0
        internal Template GetTemplate(string templateFile)
        {
            if (templates == null)
                templates = new Dictionary<string, Template>();

            var fullName = Path.GetFullPath(templateFile);
            return templates.ContainsKey(fullName) ?
                templates[fullName] :
                (templates[fullName] = new Template(templateFile));
        }
 private FlatironExceptionData(Template template, int executableLine)
 {
     Template = template;
     Line = Template.ExecutableToTemplateLine(executableLine);
 }