Exemplo n.º 1
0
 /// <summary>
 /// Merges a stream template and write the result to a TextWriter.
 /// </summary>
 /// <param name="reader">the stream of the template to merge</param>
 /// <param name="context">an hashtable with context values</param>
 /// <param name="writer">the text writer to write the result to</param>
 public static void MergeTemplate(System.IO.TextReader reader, Hashtable context, System.IO.TextWriter writer)
 {
     VelocityMerger merger = new VelocityMerger();
     merger.Evaluate(reader, context, writer);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Merges a stream template and returns the result in a string.
 /// </summary>
 /// <param name="reader">the stream of the template to merge</param>
 /// <param name="context">an hashtable with context values</param>
 /// <returns>the merged text in a string</returns>
 public static string MergeTemplate(System.IO.TextReader reader, Hashtable context)
 {
     VelocityMerger merger = new VelocityMerger();
     return merger.Evaluate(reader, context);
 }