예제 #1
0
        internal override IProducerConsumer CreatePullChain(Stream input, ConverterStream converterStream)
        {
            if (this.inputEncoding == null)
            {
                throw new InvalidOperationException(TextConvertersStrings.InputEncodingRequired);
            }
            ConverterInput  input2 = new ConverterDecodingInput(input, false, this.inputEncoding, this.detectEncodingFromByteOrderMark, this.maxHtmlTagSize, this.testMaxHtmlRestartOffset, base.InputStreamBufferSize, base.TestBoundaryConditions, this, converterStream);
            ConverterOutput output = new ConverterEncodingOutput(converterStream, false, true, this.outputEncodingSameAsInput ? this.inputEncoding : this.outputEncoding, this.outputEncodingSameAsInput, base.TestBoundaryConditions, this);

            return(this.CreateChain(input2, output, converterStream));
        }
예제 #2
0
        internal override IProducerConsumer CreatePushChain(ConverterStream converterStream, TextWriter output)
        {
            if (this.inputEncoding == null)
            {
                throw new InvalidOperationException(TextConvertersStrings.InputEncodingRequired);
            }
            this.outputEncoding = Encoding.Unicode;
            ConverterInput  input   = new ConverterDecodingInput(converterStream, true, this.inputEncoding, this.detectEncodingFromByteOrderMark, this.maxHtmlTagSize, this.testMaxHtmlRestartOffset, base.InputStreamBufferSize, base.TestBoundaryConditions, this, null);
            ConverterOutput output2 = new ConverterUnicodeOutput(output, true, true);

            return(this.CreateChain(input, output2, converterStream));
        }