コード例 #1
0
ファイル: VelocityEngine.cs プロジェクト: zyj0021/NVelocity
 /// <summary>
 /// <p>
 /// Set the an ApplicationAttribute, which is an Object
 /// set by the application which is accessible from
 /// any component of the system that gets a RuntimeServices.
 /// This allows communication between the application
 /// environment and custom pluggable components of the
 /// Velocity engine, such as loaders and loggers.
 /// </p>
 /// <p>
 /// Note that there is no enforcement or rules for the key
 /// used - it is up to the application developer.  However, to
 /// help make the intermixing of components possible, using
 /// the target Class name (e.g.  com.foo.bar ) as the key
 /// might help avoid collision.
 /// </p>
 /// </summary>
 /// <param name="key">object 'name' under which the object is stored</param>
 /// <param name="value">object to store under this key</param>
 public void SetApplicationAttribute(Object key, Object value)
 {
     runtimeInstance.SetApplicationAttribute(key, value);
 }
コード例 #2
0
 /// <summary>  <p>
 /// Sets an application attribute (which can be any Object) that will be
 /// accessible from any component of the system that gets a
 /// RuntimeServices. This allows communication between the application
 /// environment and custom pluggable components of the Velocity engine,
 /// such as ResourceLoaders and LogChutes.
 /// </p>
 ///
 /// <p>
 /// Note that there is no enforcement or rules for the key
 /// used - it is up to the application developer.  However, to
 /// help make the intermixing of components possible, using
 /// the target Class name (e.g. com.foo.bar ) as the key
 /// might help avoid collision.
 /// </p>
 ///
 /// </summary>
 /// <param name="key">object 'name' under which the object is stored
 /// </param>
 /// <param name="value">object to store under this key
 /// </param>
 public virtual void SetApplicationAttribute(object key, object value)
 {
     ri.SetApplicationAttribute(key, value);
 }