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

AddProperty() public method

Add a property to the configuration. If it already exists then the value stated here will be added to the configuration entry. For example, if resource.loader = file is already present in the configuration and you addProperty("resource.loader", "classpath") Then you will end up with a IList like the following: ["file", "classpath"]
public AddProperty ( String key, Object value ) : void
key String key
value Object value
return void
		public void AddProperty(String key, Object value)
		{
			if (overridingProperties == null)
			{
				overridingProperties = new ExtendedProperties();
			}

			overridingProperties.AddProperty(key, value);
		}

Usage Example

示例#1
0
 /// <summary> Add a property to the configuration. If it already
 /// exists then the value stated here will be added
 /// to the configuration entry. For example, if
 ///
 /// <code>resource.loader = file</code>
 ///
 /// is already present in the configuration and you
 ///
 /// <code>addProperty("resource.loader", "classpath")</code>
 ///
 /// Then you will end up with an ArrayList like the
 /// following:
 ///
 /// ["file", "classpath"]
 /// </summary>
 /// <param name="key">key</param>
 /// <param name="value">value</param>
 public static void AddProperty(String key, Object value)
 {
     ri.AddProperty(key, value);
 }