ToString() public method

This will return the characters that have been appended to the Template as a String object. If the String object has been created before then a cached String object will be returned. This method will return null after clear is invoked.
public ToString ( ) : String
return String
示例#1
0
 /// <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();
     }
 }
示例#2
0
 /// <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());
 }
示例#3
0
 /// <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());
 }