C# 클래스 NVelocity.Runtime.VelocimacroManager

Manages VMs in namespaces. Currently, two namespace modes are supported: *
  • flat - all allowable VMs are in the global namespace
  • local - inline VMs are added to it's own template namespace
* Thanks to Jose Alberto Fernandez for some ideas incorporated here. *
파일 보기 프로젝트 열기: rasmus-toftdahl-olesen/NVelocity 1 사용 예제들

공개 메소드들

메소드 설명
AddVM ( String vmName, String macroBody, String argArray, String ns ) : bool

Adds a VM definition to the cache.

DumpNamespace ( String ns ) : bool

Removes the VMs and the namespace from the manager. Used when a template is reloaded to avoid accumulating drek

GetLibraryName ( String vmName, String ns ) : String
get ( String vmName, String ns ) : VelocimacroProxy

gets a new living VelocimacroProxy object by the name / source template duple

비공개 메소드들

메소드 설명
AddNamespace ( String ns ) : Hashtable

adds a namespace to the namespaces

GetNamespace ( String ns ) : Hashtable

public switch to let external user of manager to control namespace usage indep of properties. That way, for example, at startup the library files are loaded into global namespace returns the hash for the specified namespace. Will not create a new one if it doesn't exist

GetNamespace ( String ns, bool addIfNew ) : Hashtable

returns the hash for the specified namespace, and if it doesn't exist will create a new one and add it to the namespaces

InitBlock ( ) : void
UsingNamespaces ( String ns ) : bool

determines if currently using namespaces.

VelocimacroManager ( IRuntimeServices rs ) : System

Adds the global namespace to the hash.

메소드 상세

AddVM() 공개 메소드

Adds a VM definition to the cache.
public AddVM ( String vmName, String macroBody, String argArray, String ns ) : bool
vmName String
macroBody String
argArray String
ns String
리턴 bool

DumpNamespace() 공개 메소드

Removes the VMs and the namespace from the manager. Used when a template is reloaded to avoid accumulating drek
public DumpNamespace ( String ns ) : bool
ns String namespace to dump ///
리턴 bool

GetLibraryName() 공개 메소드

public GetLibraryName ( String vmName, String ns ) : String
vmName String
ns String
리턴 String

get() 공개 메소드

gets a new living VelocimacroProxy object by the name / source template duple
public get ( String vmName, String ns ) : VelocimacroProxy
vmName String
ns String
리턴 VelocimacroProxy