Exemplo n.º 1
0
        /// <summary>
        /// Produces HTML code for a section of the line, with &lt;span class="colorName"&gt; tags.
        /// </summary>
        public string ToHtml(int startOffset, int endOffset, HtmlOptions options = null)
        {
            StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture);

            using (var htmlWriter = new HtmlRichTextWriter(stringWriter, options)) {
                WriteTo(htmlWriter, startOffset, endOffset);
            }
            return(stringWriter.ToString());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Produces HTML code for a section of the line, with &lt;span style="..."&gt; tags.
        /// </summary>
        public string ToHtml(int offset, int length, HtmlOptions options = null)
        {
            StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture);

            using (var htmlWriter = new HtmlRichTextWriter(stringWriter, options)) {
                htmlWriter.Write(this, offset, length);
            }
            return(stringWriter.ToString());
        }
Exemplo n.º 3
0
        /// <summary>
        /// Produces HTML code for the line, with &lt;span class="colorName"&gt; tags.
        /// </summary>
        public string ToHtml(HtmlOptions options = null)
        {
            StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture);

            using (var htmlWriter = new HtmlRichTextWriter(stringWriter, options)) {
                WriteTo(htmlWriter);
            }
            return(stringWriter.ToString());
        }