NVelocity.Runtime.RuntimeInstance.GetContent C# (CSharp) Method

GetContent() public method

Returns a static content resource from the resource manager. Uses the current value if INPUT_ENCODING as the character encoding.
/// if template not found from any available source. ///
public GetContent ( String name ) : ContentResource
name String Name of content resource to get
return NVelocity.Runtime.Resource.ContentResource
		public ContentResource GetContent(String name)
		{
			// the encoding is irrelvant as we don't do any converstion
			// the bytestream should be dumped to the output stream
			return GetContent(name, GetString(RuntimeConstants.INPUT_ENCODING, RuntimeConstants.ENCODING_DEFAULT));
		}

Same methods

RuntimeInstance::GetContent ( String name, String encoding ) : ContentResource

Usage Example

示例#1
0
 /// <summary> Returns a static content resource from the
 /// resource manager.  Uses the current value
 /// if INPUT_ENCODING as the character encoding.
 /// *
 /// </summary>
 /// <param name="name">Name of content resource to get
 /// </param>
 /// <returns>parsed ContentResource object ready for use
 /// @throws ResourceNotFoundException if template not found
 /// from any available source.
 ///
 /// </returns>
 public static ContentResource GetContent(String name)
 {
     return(ri.GetContent(name));
 }