C# Класс Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine

Implements a view engine using the popular Velocity syntax.

For details on the syntax, check the VTL Reference Guide http://jakarta.apache.org/velocity/docs/vtl-reference-guide.html

Наследование: ViewEngineBase, IInitializable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
velocity NVelocity.App.VelocityEngine

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

Метод Описание
CreateJSGenerator ( IRailsEngineContext context ) : object
GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
HasTemplate ( String templateName ) : bool

Evaluates whether the specified template exists.

Initialize ( ) : void
NVelocityViewEngine ( ) : NVelocity

Creates a new NVelocityViewEngine instance.

Process ( IRailsEngineContext context, Controller controller, String viewName ) : void

Processes the specified context.

Process ( TextWriter output, IRailsEngineContext context, Controller controller, String viewName ) : void

Processes the view - using the templateName to obtain the correct template and writes the results to the System.TextWriter. No layout is applied!

ProcessContents ( IRailsEngineContext context, Controller controller, String contents ) : void
ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void
Service ( IServiceProvider provider ) : void

Защищенные методы

Метод Описание
BeforeApplyingLayout ( string layout, string &contents, Controller controller, IContext ctx, IRailsEngineContext context ) : void
BeforeMerge ( VelocityEngine velocityEngine, Template template, IContext context ) : void
InitializeVelocityProperties ( ExtendedProperties props ) : void

Initializes basic velocity properties. The main purpose of this method is to allow this logic to be overrided.

RenderLayout ( string layoutName, string contents, IContext ctx, IRailsEngineContext context, TextWriter output ) : void
ResolveJSTemplateName ( string templateName ) : string

Resolves the template name into a velocity JS template file name.

ResolveLayoutTemplateName ( string templateName ) : string

Resolves the layout template name into a velocity template file name.

ResolveTemplateName ( string templateName ) : string

Resolves the template name into a velocity template file name.

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

Метод Описание
CreateContext ( IRailsEngineContext context, Controller controller ) : IContext
LoadMacros ( ExtendedProperties props ) : void
ProcessLayout ( String contents, Controller controller, IContext ctx, IRailsEngineContext context ) : void
SendErrorDetails ( Exception ex, TextWriter writer ) : void

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

BeforeApplyingLayout() защищенный Метод

protected BeforeApplyingLayout ( string layout, string &contents, Controller controller, IContext ctx, IRailsEngineContext context ) : void
layout string
contents string
controller Controller
ctx IContext
context IRailsEngineContext
Результат void

BeforeMerge() защищенный Метод

protected BeforeMerge ( VelocityEngine velocityEngine, Template template, IContext context ) : void
velocityEngine NVelocity.App.VelocityEngine
template NVelocity.Template
context IContext
Результат void

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

public CreateJSGenerator ( IRailsEngineContext context ) : object
context IRailsEngineContext
Результат object

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

public GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
templateName string
Результат void

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

Evaluates whether the specified template exists.
public HasTemplate ( String templateName ) : bool
templateName String
Результат bool

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

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

InitializeVelocityProperties() защищенный Метод

Initializes basic velocity properties. The main purpose of this method is to allow this logic to be overrided.
protected InitializeVelocityProperties ( ExtendedProperties props ) : void
props Commons.Collections.ExtendedProperties The collection to populate.
Результат void

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

Creates a new NVelocityViewEngine instance.
public NVelocityViewEngine ( ) : NVelocity
Результат NVelocity

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

Processes the specified context.
public Process ( IRailsEngineContext context, Controller controller, String viewName ) : void
context IRailsEngineContext The context.
controller Controller The controller.
viewName String Name of the view.
Результат void

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

Processes the view - using the templateName to obtain the correct template and writes the results to the System.TextWriter. No layout is applied!
public Process ( TextWriter output, IRailsEngineContext context, Controller controller, String viewName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
viewName String
Результат void

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

public ProcessContents ( IRailsEngineContext context, Controller controller, String contents ) : void
context IRailsEngineContext
controller Controller
contents String
Результат void

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

public ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
partialName string
Результат void

RenderLayout() защищенный Метод

protected RenderLayout ( string layoutName, string contents, IContext ctx, IRailsEngineContext context, TextWriter output ) : void
layoutName string
contents string
ctx IContext
context IRailsEngineContext
output System.IO.TextWriter
Результат void

ResolveJSTemplateName() защищенный Метод

Resolves the template name into a velocity JS template file name.
protected ResolveJSTemplateName ( string templateName ) : string
templateName string
Результат string

ResolveLayoutTemplateName() защищенный Метод

Resolves the layout template name into a velocity template file name.
protected ResolveLayoutTemplateName ( string templateName ) : string
templateName string
Результат string

ResolveTemplateName() защищенный Метод

Resolves the template name into a velocity template file name.
protected ResolveTemplateName ( string templateName ) : string
templateName string
Результат string

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

public Service ( IServiceProvider provider ) : void
provider IServiceProvider
Результат void

Описание свойств

velocity защищенное свойство

protected VelocityEngine,NVelocity.App velocity
Результат NVelocity.App.VelocityEngine