private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.locked = true; HtmlParser htmlParser = new HtmlParser(input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.testBoundaryConditions); if (this.mode == TextExtractionMode.ExtractText) { return(new HtmlTextExtractionConverter(htmlParser, output, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum)); } Injection injection = null; if (this.injectHead != null || this.injectTail != null) { injection = ((this.injectionFormat == HeaderFooterFormat.Html) ? new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, false, null, this.testBoundaryConditions, null, progressMonitor) : new TextInjection(this.injectHead, this.injectTail, this.testBoundaryConditions, null, progressMonitor)); } IHtmlParser parser = htmlParser; if (this.normalizeInputHtml) { if (this.injectionFormat == HeaderFooterFormat.Html) { parser = new HtmlNormalizingParser(htmlParser, (HtmlInjection)injection, false, this.testMaxHtmlNormalizerNesting, this.testBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); injection = null; } else { parser = new HtmlNormalizingParser(htmlParser, null, false, this.testMaxHtmlNormalizerNesting, this.testBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); } } TextOutput output2 = new TextOutput(output, this.wrapFlowed, this.wrapFlowed, 72, 78, this.imageRenderingCallback, this.fallbacks, this.htmlEscape, this.testPreserveTrailingSpaces, this.testFormatTraceStream); return(new HtmlToTextConverter(parser, output2, injection, false, false, this.testTreatNbspAsBreakable, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.ShouldUseNarrowGapForPTagHtmlToTextConversion, this.OutputAnchorLinks, this.OutputImageLinks)); }
private FormatConverter CreateChain(ConverterInput input, IProgressMonitor progressMonitor) { this.RecognizeHyperlinks = true; this.Locked = true; TextParser parser = new TextParser(input, this.unwrapFlowed, this.unwrapDelSp, this.testMaxTokenRuns, base.TestBoundaryConditions); FormatStore store = new FormatStore(); return(new TextFormatConverter(parser, store, null, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.testFormatConverterTraceStream)); }
private FormatConverter CreateChain(ConverterInput input, IProgressMonitor progressMonitor) { this.Locked = true; HtmlParser parser = new HtmlParser(input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, base.TestBoundaryConditions); HtmlNormalizingParser parser2 = new HtmlNormalizingParser(parser, null, false, this.testMaxHtmlNormalizerNesting, base.TestBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); FormatStore formatStore = new FormatStore(); return(new HtmlFormatConverter(parser2, formatStore, false, false, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.TestFormatConverterTraceStream, progressMonitor)); }
private IProducerConsumer CreateChain(ConverterInput input, FormatOutput output, IProgressMonitor progressMonitor) { this.locked = true; Injection injection = null; if (this.injectHead != null || this.injectTail != null) { injection = ((this.injectionFormat == HeaderFooterFormat.Html) ? new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, false, null, this.testBoundaryConditions, null, progressMonitor) : new TextInjection(this.injectHead, this.injectTail, this.testBoundaryConditions, null, progressMonitor)); } TextParser parser = new TextParser(input, this.unwrapFlowed, this.unwrapDelSp, this.testMaxTokenRuns, this.testBoundaryConditions); return(new TextFormatConverter(parser, output, injection, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.testFormatConverterTraceStream)); }
private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.locked = true; Injection injection = null; EnrichedParser parser = new EnrichedParser(input, this.testMaxTokenRuns, this.testBoundaryConditions); if (this.injectHead != null || this.injectTail != null) { injection = ((this.injectionFormat == HeaderFooterFormat.Html) ? new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, false, null, this.testBoundaryConditions, null, progressMonitor) : new TextInjection(this.injectHead, this.injectTail, this.testBoundaryConditions, null, progressMonitor)); } TextOutput output2 = new TextOutput(output, this.wrapFlowed, this.wrapFlowed, 72, 78, null, this.fallbacks, this.htmlEscape, this.testPreserveTrailingSpaces, this.testFormatTraceStream); return(new EnrichedToTextConverter(parser, output2, injection, this.testTreatNbspAsBreakable, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum)); }
// Token: 0x06000FAE RID: 4014 RVA: 0x0007539C File Offset: 0x0007359C private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.locked = true; HtmlInjection injection = null; HtmlParser parser = new HtmlParser(input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.testBoundaryConditions); if (this.injectHead != null || this.injectTail != null) { injection = new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, false, null, this.testBoundaryConditions, null, progressMonitor); } HtmlNormalizingParser parser2 = new HtmlNormalizingParser(parser, injection, false, this.testMaxHtmlNormalizerNesting, this.testBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); EnrichedFormatOutput output2 = new EnrichedFormatOutput(output, null, this.fallbacks, this.testFormatTraceStream, this.testFormatOutputTraceStream); return(new HtmlFormatConverter(parser2, output2, false, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.testFormatConverterTraceStream, progressMonitor)); }
private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.locked = true; HtmlInjection injection = null; if (this.injectHead != null || this.injectTail != null) { injection = new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, this.filterHtml, this.htmlCallback, this.testBoundaryConditions, null, progressMonitor); } TextParser parser = new TextParser(input, this.unwrapFlowed, this.unwrapDelSp, this.testMaxTokenRuns, this.testBoundaryConditions); HtmlWriter writer = new HtmlWriter(output, this.filterHtml, false); FormatOutput output2 = new HtmlFormatOutput(writer, injection, this.outputFragment, this.testFormatTraceStream, this.testFormatOutputTraceStream, this.filterHtml, this.htmlCallback, true); return(new TextFormatConverter(parser, output2, null, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.testFormatConverterTraceStream)); }
private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.locked = true; HtmlInjection injection = null; if (this.injectHead != null || this.injectTail != null) { injection = new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, this.filterHtml, this.htmlCallback, this.testBoundaryConditions, null, progressMonitor); } HtmlParser parser = new HtmlParser(input, this.detectEncodingFromMetaTag, false, TextConvertersDefaults.MaxTokenRuns(this.testBoundaryConditions), TextConvertersDefaults.MaxHtmlAttributes(this.testBoundaryConditions), this.testBoundaryConditions); HtmlNormalizingParser parser2 = new HtmlNormalizingParser(parser, injection, false, TextConvertersDefaults.MaxHtmlNormalizerNesting(this.testBoundaryConditions), this.testBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); HtmlWriter writer = new HtmlWriter(output, this.filterHtml, true); FormatOutput output2 = new HtmlFormatOutput(writer, null, this.OutputFragment, this.TestFormatTraceStream, this.TestFormatOutputTraceStream, this.filterHtml, this.htmlCallback, false); return(new HtmlFormatConverter(parser2, output2, false, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.TestFormatConverterTraceStream, progressMonitor)); }
private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.locked = true; HtmlInjection htmlInjection = null; HtmlInjection htmlInjection2 = null; IProducerConsumer result; try { if (this.injectHead != null || this.injectTail != null) { htmlInjection2 = new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, this.filterHtml, this.htmlCallback, this.testBoundaryConditions, null, progressMonitor); htmlInjection = htmlInjection2; this.normalizeInputHtml = true; } if (this.filterHtml || this.outputFragment || this.htmlCallback != null) { this.normalizeInputHtml = true; } IHtmlParser parser2; if (this.normalizeInputHtml) { HtmlParser parser = new HtmlParser(input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.testBoundaryConditions); parser2 = new HtmlNormalizingParser(parser, htmlInjection, this.htmlCallback != null, this.testMaxHtmlNormalizerNesting, this.testBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); htmlInjection2 = null; } else { parser2 = new HtmlParser(input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.testBoundaryConditions); } HtmlWriter writer = new HtmlWriter(output, this.filterHtml, this.normalizeInputHtml && !this.testNoNewLines); result = new HtmlToHtmlConverter(parser2, writer, this.testConvertFragment, this.outputFragment, this.filterHtml, this.htmlCallback, this.testTruncateForCallback, htmlInjection != null && htmlInjection.HaveTail, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.smallCssBlockThreshold, this.preserveDisplayNoneStyle, progressMonitor); } finally { IDisposable disposable = htmlInjection2; if (disposable != null) { disposable.Dispose(); htmlInjection2 = null; } } return(result); }
// Token: 0x06000E8D RID: 3725 RVA: 0x00073120 File Offset: 0x00071320 private IProducerConsumer CreateChain(ConverterInput input, FormatOutput output, IProgressMonitor progressMonitor) { this.locked = true; HtmlInjection injection = null; if (this.injectHead != null || this.injectTail != null) { injection = new HtmlInjection(this.injectHead, this.injectTail, this.injectionFormat, false, null, this.testBoundaryConditions, null, progressMonitor); } HtmlParser parser = new HtmlParser(input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.testBoundaryConditions); HtmlNormalizingParser parser2 = new HtmlNormalizingParser(parser, injection, false, this.testMaxHtmlNormalizerNesting, this.testBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); HtmlFormatConverter result; if (this.encapsulateMarkup) { result = new HtmlFormatConverterWithEncapsulation(parser2, output, this.encapsulateMarkup, false, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.testFormatConverterTraceStream, progressMonitor); } else { result = new HtmlFormatConverter(parser2, output, false, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.testFormatConverterTraceStream, progressMonitor); } return(result); }
private IProducerConsumer CreateChain(ConverterInput input, ConverterOutput output, IProgressMonitor progressMonitor) { this.Locked = true; HtmlInjection injection = null; if (this.injectHead != null || this.injectTail != null) { injection = new HtmlInjection( this.injectHead, this.injectTail, this.injectionFormat, this.filterHtml, this.htmlCallback, this.TestBoundaryConditions, null, progressMonitor); this.normalizeInputHtml = true; } if (this.filterHtml || this.outputFragment || this.htmlCallback != null) { this.normalizeInputHtml = true; } IHtmlParser parser; if (this.normalizeInputHtml) { HtmlParser preParser = new HtmlParser( input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.TestBoundaryConditions); parser = new HtmlNormalizingParser( preParser, injection, this.htmlCallback != null, this.testMaxHtmlNormalizerNesting, this.TestBoundaryConditions, this.testNormalizerTraceStream, this.testNormalizerTraceShowTokenNum, this.testNormalizerTraceStopOnTokenNum); } else { parser = new HtmlParser( input, this.detectEncodingFromMetaTag, false, this.testMaxTokenRuns, this.testMaxHtmlTagAttributes, this.TestBoundaryConditions); } HtmlWriter writer = new HtmlWriter( output, this.filterHtml, this.normalizeInputHtml); return(new HtmlToHtmlConverter( parser, writer, false, this.outputFragment, this.filterHtml, this.htmlCallback, this.testTruncateForCallback, injection != null && injection.HaveTail, this.testTraceStream, this.testTraceShowTokenNum, this.testTraceStopOnTokenNum, this.smallCssBlockThreshold, this.preserveDisplayNoneStyle, progressMonitor)); }