Exemplo n.º 1
0
        /// <summary>  renders the input string using the context into the output writer.
        /// To be used when a template is dynamically constructed, or want to use
        /// Velocity as a token replacer.
        ///
        /// </summary>
        /// <param name="context">context to use in rendering input string
        /// </param>
        /// <param name="out"> Writer in which to render the output
        /// </param>
        /// <param name="logTag"> string to be used as the template name for Log
        /// messages in case of Error
        /// </param>
        /// <param name="instring">input string containing the VTL to be rendered
        ///
        /// </param>
        /// <returns> true if successful, false otherwise.  If false, see
        /// Velocity runtime Log
        /// </returns>
        /// <throws>  ParseErrorException The template could not be parsed. </throws>
        /// <throws>  MethodInvocationException A method on a context object could not be invoked. </throws>
        /// <throws>  ResourceNotFoundException A referenced resource could not be loaded. </throws>
        /// <throws>  IOException While rendering to the writer, an I/O problem occured. </throws>

        public virtual bool Evaluate(IContext context, TextWriter writer, string logTag, string instring)
        {
            return(ri.Evaluate(context, writer, logTag, instring));
        }