コード例 #1
0
        /// <summary>
        /// Processes an input string using the specified
        /// parsing and typographic rules.
        /// </summary>
        public virtual string Execute(TextReader reader, IValueSet parameters)
        {
            Precondition.Require(reader, () => Error.ArgumentNull("reader"));
            using (StringWriter writer = new StringWriter())
            {
                using (HtmlFilter parser = new HtmlFilter(reader, writer, Filter))
                {
                    parser.Typographics = Typographics;
                    parser.Parameters   = parameters;
                    parser.Execute();

                    return(writer.ToString());
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Processes an input string using the specified 
        /// parsing and typographic rules.
        /// </summary>
		public virtual string Execute(TextReader reader, IValueSet parameters)
        {
            Precondition.Require(reader, () => Error.ArgumentNull("reader"));
			using (StringWriter writer = new StringWriter())
			{
				using (HtmlFilter parser = new HtmlFilter(reader, writer, Filter))
				{
					parser.Typographics = Typographics;
					parser.Parameters = parameters;
					parser.Execute();

					return writer.ToString();
				}
			}
        }