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. *
Показать файл Открыть проект Примеры использования класса

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

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