/// <summary> /// This method is used to append the provided text and then it /// converts the buffered text to return the corrosponding text. /// The contents of the buffer remain unchanged after the value /// is buffered. It must be cleared if used as replacement only. /// </summary> /// <param name="value"> /// this is the value to append to the buffer /// </param> /// <returns> /// returns the value of the buffer after the append /// </returns> public String Process(String value) { if (value.indexOf('$') < 0) { return(value); } try { source.Append(value); Parse(); return(text.ToString()); }finally { Clear(); } }
/// <summary> /// This will replace the accumulated for an system variable /// name with the value of that system variable. If a value /// does not exist for the variable name, then the name is put /// into the value so that the value remains unmodified. /// </summary> /// <param name="name"> /// this is the name of the system variable /// </param> public void Replace(Template name) { Replace(name.ToString()); }
/// <summary> /// This will replace the accumulated for an system variable /// name with the value of that system variable. If a value /// does not exist for the variable name, then the name is put /// into the value so that the value remains unmodified. /// </summary> /// <param name="name"> /// this is the name of the system variable /// </param> public void Replace(Template name) { Replace(name.ToString()); }