public void Merge(ITemplate template, IDictionary<string, object> context, TextWriter output)
 {
     var ncontext = new global::NVelocity.VelocityContext();
     foreach (var pair in context)
     {
         ncontext.Put(pair.Key, pair.Value);
     }
     velocityEngine.Evaluate(ncontext, output, "merger", template.GetContent());
 }
 public string Merge(ITemplate template, IDictionary<string, object> context)
 {
     var ncontext = new global::NVelocity.VelocityContext();
     foreach (var pair in context)
     {
         ncontext.Put(pair.Key, pair.Value);
     }
     StringWriter sw = new StringWriter();
     velocityEngine.Evaluate(ncontext, sw, "merger", template.GetContent());
     return sw.GetStringBuilder().ToString();
 }
Exemplo n.º 3
0
 public string Merge(ITemplate template, IDictionary<string, object> context)
 {
     return template.GetContent();
 }
Exemplo n.º 4
0
 public void Merge(ITemplate template, IDictionary<string, object> context, System.IO.TextWriter output)
 {
     output.Write(template.GetContent());
 }