NVelocity.Context
Class AbstractContext

Constructor Summary
AbstractContext()
         default CTOR
AbstractContext(NVelocity.Context.IContext inner)
         Chaining constructor accepts a Context argument. It will relay get() operations into this Context in the even the 'local' get() returns null.

Property Summary
NVelocity.Context.IContext ChainedContext
object[] Keys

Properties inherited from class NVelocity.Context.InternalContextBase
CurrentResource, CurrentTemplateName, EventCartridge, TemplateNameStack

Method Summary
bool ContainsKey(object key)
         Indicates whether the specified key is in the context. Provided for debugging purposes. *
object Get(string key)
         Gets the value corresponding to the provided key from the context. * Supports the chaining context mechanism. If the 'local' context doesn't have the value, we try to get it from the chained context. *
bool InternalContainsKey(object key)
object InternalGet(string key)
object[] InternalGetKeys()
object InternalPut(string key, object value_Renamed)
object InternalRemove(object key)
object Put(string key, object value_Renamed)
         Adds a name/value pair to the context.
object Remove(object key)
         Removes the value associated with the specified key from the context. *

Methods inherited from class NVelocity.Context.InternalContextBase
AttachEventCartridge, ICacheGet, ICachePut, PopCurrentTemplateName, PushCurrentTemplateName

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


Constructor Detail

AbstractContext

public AbstractContext()

default CTOR


AbstractContext

public AbstractContext(NVelocity.Context.IContext inner)

Chaining constructor accepts a Context argument. It will relay get() operations into this Context in the even the 'local' get() returns null.

Parameters:
inner - context to be chained
Property Detail

ChainedContext

public NVelocity.Context.IContext ChainedContext


Keys

public object[] Keys

Method Detail

ContainsKey

public bool ContainsKey(object key)

Indicates whether the specified key is in the context. Provided for debugging purposes. *

Parameters:
key - The key to look for.
Returns:
true if the key is in the context, false if not.

Get

public object Get(string key)

Gets the value corresponding to the provided key from the context. * Supports the chaining context mechanism. If the 'local' context doesn't have the value, we try to get it from the chained context. *

Parameters:
key - The name of the desired value.
Returns:
The value corresponding to the provided key or null if the key param is null.

InternalContainsKey

public bool InternalContainsKey(object key)


InternalGet

public object InternalGet(string key)


InternalGetKeys

public object[] InternalGetKeys()


InternalPut

public object InternalPut(string key,
                          object value_Renamed)


InternalRemove

public object InternalRemove(object key)


Put

public object Put(string key,
                  object value_Renamed)

Adds a name/value pair to the context.

Parameters:
key - The name to key the provided value with.
value - The corresponding value.
Returns:
Object that was replaced in the the Context if applicable or null if not.

Remove

public object Remove(object key)

Removes the value associated with the specified key from the context. *

Parameters:
key - The name of the value to remove.
Returns:
The value that the key was mapped to, or
null
if unmapped.