Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

VelocityEngineUtils.MergeTemplate Method

Merge the specified Velocity template with the given model and write the result to the given Writer.

[Visual Basic]
Public Shared Sub MergeTemplate( _
   ByVal velocityEngine As VelocityEngine, _
   ByVal templateLocation As String, _
   ByVal encoding As String, _
   ByVal model As Hashtable, _
   ByVal writer As TextWriter _
)
[C#]
public static void MergeTemplate(
   VelocityEngine velocityEngine,
   string templateLocation,
   string encoding,
   Hashtable model,
   TextWriter writer
);

Parameters

velocityEngine
VelocityEngine to work with
templateLocation
the location of template, relative to Velocity's resource loader path
encoding
encoding the encoding of the template file
model
the Hashtable that contains model names as keys and model objects
writer
writer the TextWriter to write the result to

Exceptions

Exception Type Condition
VelocityException thrown if any exception is thrown by the velocity engine

See Also

VelocityEngineUtils Class | Spring.Template.Velocity Namespace