C# Class NVelocity.VelocityContext

General purpose implemention of the application Context interface for general application use. This class should be used in place of the original Context class.
Inheritance: NVelocity.Context.AbstractContext
显示文件 Open project: rasmus-toftdahl-olesen/NVelocity Class Usage Examples

Public Methods

Method Description
InternalContainsKey ( Object key ) : bool

determines if there is a value for the given key

InternalGet ( String key ) : Object

retrieves value for key from internal storage

InternalGetKeys ( ) : Object[]

returns array of keys

InternalPut ( String key, Object value ) : Object

stores the value for key to internal storage

InternalRemove ( Object key ) : Object

remove a key/value pair from the internal storage

VelocityContext ( ) : System

Creates a new instance (with no inner context).

VelocityContext ( Hashtable context ) : System

Creates a new instance with the provided storage (and no inner context).

VelocityContext ( Hashtable context, IContext innerContext ) : System

Initializes internal storage (never to null), and inner context.

VelocityContext ( IContext innerContext ) : System

Chaining constructor, used when you want to wrap a context in another. The inner context will be 'read only' - put() calls to the wrapping context will only effect the outermost context

Method Details

InternalContainsKey() public method

determines if there is a value for the given key
public InternalContainsKey ( Object key ) : bool
key Object name of value to check
return bool

InternalGet() public method

retrieves value for key from internal storage
public InternalGet ( String key ) : Object
key String name of value to get
return Object

InternalGetKeys() public method

returns array of keys
public InternalGetKeys ( ) : Object[]
return Object[]

InternalPut() public method

stores the value for key to internal storage
public InternalPut ( String key, Object value ) : Object
key String name of value to store
value Object value to store
return Object

InternalRemove() public method

remove a key/value pair from the internal storage
public InternalRemove ( Object key ) : Object
key Object name of value to remove
return Object

VelocityContext() public method

Creates a new instance (with no inner context).
public VelocityContext ( ) : System
return System

VelocityContext() public method

Creates a new instance with the provided storage (and no inner context).
public VelocityContext ( Hashtable context ) : System
context System.Collections.Hashtable
return System

VelocityContext() public method

Initializes internal storage (never to null), and inner context.
public VelocityContext ( Hashtable context, IContext innerContext ) : System
context System.Collections.Hashtable Internal storage, or null to /// create default storage. ///
innerContext IContext Inner context. /// ///
return System

VelocityContext() public method

Chaining constructor, used when you want to wrap a context in another. The inner context will be 'read only' - put() calls to the wrapping context will only effect the outermost context
public VelocityContext ( IContext innerContext ) : System
innerContext IContext The Context implementation to wrap.
return System