C# Класс Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.NVelocityTemplateEngine

Implementation of ITemplateEngine that uses NVelocity
Наследование: ITemplateEngine, ISupportInitialize
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
CreateContext ( IDictionary context ) : IContext
ExpandTemplateDir ( String templateDir ) : String

Описание методов

AddResourceAssembly() публичный Метод

Add an assembly to the resource collection.
public AddResourceAssembly ( string assembly ) : void
assembly string
Результат void

BeginInit() публичный Метод

Starts/configure NVelocity based on the properties.
public BeginInit ( ) : void
Результат void

EndInit() публичный Метод

public EndInit ( ) : void
Результат void

HasTemplate() публичный Метод

Returns true only if the specified template exists and can be used
public HasTemplate ( String templateName ) : bool
templateName String
Результат bool

NVelocityTemplateEngine() публичный Метод

Constructs a NVelocityTemplateEngine instance assuming the default values
public NVelocityTemplateEngine ( ) : System
Результат System

NVelocityTemplateEngine() публичный Метод

Constructs a NVelocityTemplateEngine instance specifing the template directory
public NVelocityTemplateEngine ( String templateDir ) : System
templateDir String
Результат System

Process() публичный Метод

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
Результат bool

Process() публичный Метод

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.
Результат bool

Process() публичный Метод

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.
Результат bool