C# Class NVelocity.Runtime.Directive.VelocimacroProxy

VelocimacroProxy a proxy Directive-derived object to fit with the current directive system
Inheritance: Directive
Mostrar archivo Open project: rasmus-toftdahl-olesen/NVelocity Class Usage Examples

Public Methods

Method Description
Init ( IRuntimeServices rs, IInternalContextAdapter context, INode node ) : void

The major meat of VelocimacroProxy, init() checks the # of arguments, patches the macro body, renders the macro into an AST, and then initiates the AST, so it is ready for quick rendering. Note that this is only AST dependant stuff. Not context.

Render ( IInternalContextAdapter context, TextWriter writer, INode node ) : bool

Renders the macro using the context

VelocimacroProxy ( ) : System
setupMacro ( String callArgs, int callArgTypes ) : bool

basic VM setup. Sets up the proxy args for this use, and parses the tree

Private Methods

Method Description
getArgArray ( INode node ) : String[]

Gets the args to the VM from the instance-use AST

parseTree ( String callArgs ) : void

parses the macro. We need to do this here, at init time, or else the local-scope template feature is hard to get to work :)

setupProxyArgs ( String callArgs, int callArgTypes ) : void

Method Details

Init() public method

The major meat of VelocimacroProxy, init() checks the # of arguments, patches the macro body, renders the macro into an AST, and then initiates the AST, so it is ready for quick rendering. Note that this is only AST dependant stuff. Not context.
public Init ( IRuntimeServices rs, IInternalContextAdapter context, INode node ) : void
rs IRuntimeServices
context IInternalContextAdapter
node INode
return void

Render() public method

Renders the macro using the context
public Render ( IInternalContextAdapter context, TextWriter writer, INode node ) : bool
context IInternalContextAdapter
writer System.IO.TextWriter
node INode
return bool

VelocimacroProxy() public method

public VelocimacroProxy ( ) : System
return System

setupMacro() public method

basic VM setup. Sets up the proxy args for this use, and parses the tree
public setupMacro ( String callArgs, int callArgTypes ) : bool
callArgs String
callArgTypes int
return bool