C# 클래스 SimpleFramework.Xml.Core.TemplateEngine

The TemplateEngine object is used to create strings which have system variable names replaced with their values. This is used by the Source context object to ensure that values taken from an XML element or attribute can be values values augmented with system or environment variable values. tools=${java.home}/lib/tools.jar Above is an example of the use of an system variable that has been inserted into a plain Java properties file. This will be converted to the full path to tools.jar when the system variable "java.home" is replaced with the matching value.
파일 보기 프로젝트 열기: ngallagher/simplexml 1 사용 예제들

공개 메소드들

메소드 설명
Clear ( ) : void

This method is used to clear the contents of the buffer. This includes the contents of all buffers used to transform the value of the buffered text with system variable values. Once invoked the instance can be reused as a clean buffer.

Name ( ) : void

This method is used to extract text from the property value that matches the pattern "${ *TEXT }". Such patterns within the properties file are considered to be system variables, this will replace instances of the text pattern with the matching system variable, if a matching variable does not exist the value remains unmodified.

Parse ( ) : void

This extracts the value from the Java properties text. This will basically ready any text up to the first occurance of an equal of a terminal. If a terminal character is read this returns without adding the terminal to the value.

Process ( String value ) : String

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.

Replace ( ) : void

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.

Replace ( String name ) : void

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.

Replace ( Template name ) : void

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.

TemplateEngine ( Filter filter ) : SimpleFramework.Xml.Filter

Constructor for the TemplateEngine object. This is used to create a parsing buffer, which can be used to replace filter variable names with their corrosponding values.

메소드 상세

Clear() 공개 메소드

This method is used to clear the contents of the buffer. This includes the contents of all buffers used to transform the value of the buffered text with system variable values. Once invoked the instance can be reused as a clean buffer.
public Clear ( ) : void
리턴 void

Name() 공개 메소드

This method is used to extract text from the property value that matches the pattern "${ *TEXT }". Such patterns within the properties file are considered to be system variables, this will replace instances of the text pattern with the matching system variable, if a matching variable does not exist the value remains unmodified.
public Name ( ) : void
리턴 void

Parse() 공개 메소드

This extracts the value from the Java properties text. This will basically ready any text up to the first occurance of an equal of a terminal. If a terminal character is read this returns without adding the terminal to the value.
public Parse ( ) : void
리턴 void

Process() 공개 메소드

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.
public Process ( String value ) : String
value String /// this is the value to append to the buffer ///
리턴 String

Replace() 공개 메소드

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.
public Replace ( ) : void
리턴 void

Replace() 공개 메소드

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.
public Replace ( String name ) : void
name String /// this is the name of the system variable ///
리턴 void

Replace() 공개 메소드

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.
public Replace ( Template name ) : void
name Template /// this is the name of the system variable ///
리턴 void

TemplateEngine() 공개 메소드

Constructor for the TemplateEngine object. This is used to create a parsing buffer, which can be used to replace filter variable names with their corrosponding values.
public TemplateEngine ( Filter filter ) : SimpleFramework.Xml.Filter
filter Filter /// this is the filter used to provide replacements ///
리턴 SimpleFramework.Xml.Filter