C# Class Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.NVelocityTemplateEngine

Implementation of ITemplateEngine that uses NVelocity
Inheritance: ITemplateEngine, ISupportInitialize
Show file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
AddResourceAssembly ( string assembly ) : void

Add an assembly to the resource collection.

BeginInit ( ) : void

Starts/configure NVelocity based on the properties.

EndInit ( ) : void
HasTemplate ( String templateName ) : bool

Returns true only if the specified template exists and can be used

NVelocityTemplateEngine ( ) : System

Constructs a NVelocityTemplateEngine instance assuming the default values

NVelocityTemplateEngine ( String templateDir ) : System

Constructs a NVelocityTemplateEngine instance specifing the template directory

Process ( IDictionary context, String templateName, TextWriter output ) : bool

Process the template with data from the context.

Process ( IDictionary context, string templateName, TextWriter output, TextReader inputTemplate ) : bool

Process the input template with data from the context.

Process ( IDictionary context, string templateName, TextWriter output, string inputTemplate ) : bool

Process the input template with data from the context.

Private Methods

Method Description
CreateContext ( IDictionary context ) : IContext
ExpandTemplateDir ( String templateDir ) : String

Method Details

AddResourceAssembly() public method

Add an assembly to the resource collection.
public AddResourceAssembly ( string assembly ) : void
assembly string
return void

BeginInit() public method

Starts/configure NVelocity based on the properties.
public BeginInit ( ) : void
return void

EndInit() public method

public EndInit ( ) : void
return void

HasTemplate() public method

Returns true only if the specified template exists and can be used
public HasTemplate ( String templateName ) : bool
templateName String
return bool

NVelocityTemplateEngine() public method

Constructs a NVelocityTemplateEngine instance assuming the default values
public NVelocityTemplateEngine ( ) : System
return System

NVelocityTemplateEngine() public method

Constructs a NVelocityTemplateEngine instance specifing the template directory
public NVelocityTemplateEngine ( String templateDir ) : System
templateDir String
return System

Process() public method

Process the template with data from the context.
public Process ( IDictionary context, String templateName, TextWriter output ) : bool
context IDictionary
templateName String
output System.IO.TextWriter
return bool

Process() public method

Process the input template with data from the context.
public Process ( IDictionary context, string templateName, TextWriter output, TextReader inputTemplate ) : bool
context IDictionary The context.
templateName string Name of the template. Used only for information during logging
output System.IO.TextWriter The output.
inputTemplate System.IO.TextReader The input template.
return bool

Process() public method

Process the input template with data from the context.
public Process ( IDictionary context, string templateName, TextWriter output, string inputTemplate ) : bool
context IDictionary The context.
templateName string Name of the template. Used only for information during logging
output System.IO.TextWriter The output.
inputTemplate string The input template.
return bool