Parse() public method

Parse the input and return the root of AST node structure. In the event that it runs out of parsers in the pool, it will create and let them be GC'd dynamically, logging that it has to do that. This is considered an exceptional condition. It is expected that the user will set the PARSER_POOL_SIZE property appropriately for their application. We will revisit this.
public Parse ( TextReader reader, String templateName ) : SimpleNode
reader System.IO.TextReader inputstream retrieved by a resource loader
templateName String name of the template being parsed
return SimpleNode
示例#1
0
 /// <summary> Parse the input and return the root of
 /// AST node structure.
 /// </summary>
 /// <remarks>
 /// In the event that it runs out of parsers in the
 /// pool, it will create and let them be GC'd
 /// dynamically, logging that it has to do that.  This
 /// is considered an exceptional condition.  It is
 /// expected that the user will set the
 /// PARSER_POOL_SIZE property appropriately for their
 /// application.  We will revisit this.
 /// </remarks>
 /// <param name="reader">TextReader retrieved by a resource loader</param>
 /// <param name="templateName">name of the template being parsed</param>
 public static SimpleNode Parse(TextReader reader, String templateName)
 {
     return(ri.Parse(reader, templateName));
 }
示例#2
0
        /// <summary> Parse the input and return the root of
        /// AST node structure.
        /// <br><br>
        /// In the event that it runs out of parsers in the
        /// pool, it will create and let them be GC'd
        /// dynamically, logging that it has to do that.  This
        /// is considered an exceptional condition.  It is
        /// expected that the user will set the
        /// PARSER_POOL_SIZE property appropriately for their
        /// application.  We will revisit this.
        ///
        /// </summary>
        /// <param name="reader">Reader retrieved by a resource loader
        /// </param>
        /// <param name="templateName">name of the template being parsed
        /// </param>
        /// <returns> A root node representing the template as an AST tree.
        /// </returns>
        /// <throws>  ParseException When the template could not be parsed. </throws>
        /// <seealso cref="RuntimeInstance.parse(Reader, String)">
        /// </seealso>

        public static SimpleNode Parse(System.IO.TextReader reader, string templateName)
        {
            return(ri.Parse(reader, templateName));
        }