NVelocity.Context
Class VMContext

This is a special, internal-use-only context implementation to be used for the new Velocimacro implementation. * The main distinguishing feature is the management of the VMProxyArg objects in the put() and get() methods. * Further, this context also supports the 'VM local context' mode, where any get() or put() of references that aren't args to the VM are considered local to the vm, protecting the global context.

Constructor Summary
VMContext(NVelocity.Context.InternalContextAdapter inner, NVelocity.Runtime.RuntimeServices rsvc)
         CTOR, wraps an ICA

Property Summary
NVelocity.Context.InternalContextAdapter BaseContext
NVelocity.Runtime.Resource.Resource CurrentResource
string CurrentTemplateName
NVelocity.App.Events.EventCartridge EventCartridge
NVelocity.Context.IContext InternalUserContext
object[] Keys
object[] TemplateNameStack

Method Summary
void AddVMProxyArg(NVelocity.Runtime.Directive.VMProxyArg vmpa)
         Used to put VMProxyArgs into this context. It separates the VMProxyArgs into constant and non-constant types pulling out the value of the constant types so they can be modified w/o damaging the VMProxyArg, and leaving the dynamic ones, as they modify context rather than their own state
NVelocity.App.Events.EventCartridge AttachEventCartridge(NVelocity.App.Events.EventCartridge ec)
bool ContainsKey(object key)
         not yet impl
object Get(string key)
         Impl of the Context.gut() method. *
NVelocity.Util.Introspection.IntrospectionCacheData ICacheGet(object key)
void ICachePut(object key, NVelocity.Util.Introspection.IntrospectionCacheData o)
void PopCurrentTemplateName()
void PushCurrentTemplateName(string s)
object Put(string key, object value_Renamed)
         Impl of the Context.put() method. *
object Remove(object key)
         impl badly

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Constructor Detail

VMContext

public VMContext(NVelocity.Context.InternalContextAdapter inner,
                 NVelocity.Runtime.RuntimeServices rsvc)

CTOR, wraps an ICA

Property Detail

BaseContext

public NVelocity.Context.InternalContextAdapter BaseContext


CurrentResource

public NVelocity.Runtime.Resource.Resource CurrentResource


CurrentTemplateName

public string CurrentTemplateName


EventCartridge

public NVelocity.App.Events.EventCartridge EventCartridge


InternalUserContext

public NVelocity.Context.IContext InternalUserContext


Keys

public object[] Keys


TemplateNameStack

public object[] TemplateNameStack

Method Detail

AddVMProxyArg

public void AddVMProxyArg(NVelocity.Runtime.Directive.VMProxyArg vmpa)

Used to put VMProxyArgs into this context. It separates the VMProxyArgs into constant and non-constant types pulling out the value of the constant types so they can be modified w/o damaging the VMProxyArg, and leaving the dynamic ones, as they modify context rather than their own state

Parameters:
vmpa - VMProxyArg to add

AttachEventCartridge

public NVelocity.App.Events.EventCartridge AttachEventCartridge(NVelocity.App.Events.EventCartridge ec)


ContainsKey

public bool ContainsKey(object key)

not yet impl


Get

public object Get(string key)

Impl of the Context.gut() method. *

Parameters:
key - name of item to get
Returns:
stored object or null

ICacheGet

public NVelocity.Util.Introspection.IntrospectionCacheData ICacheGet(object key)


ICachePut

public void ICachePut(object key,
                      NVelocity.Util.Introspection.IntrospectionCacheData o)


PopCurrentTemplateName

public void PopCurrentTemplateName()


PushCurrentTemplateName

public void PushCurrentTemplateName(string s)


Put

public object Put(string key,
                  object value_Renamed)

Impl of the Context.put() method. *

Parameters:
key - name of item to set
value - object to set to key
Returns:
old stored object

Remove

public object Remove(object key)

impl badly