public ConverterUnicodeInput(
            object source,
            bool push,
            int maxParseToken,
            bool testBoundaryConditions,
            IProgressMonitor progressMonitor) :
            base(progressMonitor)
        {
            if (push)
            {
                InternalDebug.Assert(source is ConverterWriter);

                this.pushSource = source as ConverterWriter;
            }
            else
            {
                InternalDebug.Assert(source is TextReader);

                this.pullSource = source as TextReader;
            }

            this.maxTokenSize = maxParseToken;

            this.parseBuffer = new char[testBoundaryConditions ? 123 : 4096];

            if (this.pushSource != null)
            {
                this.pushSource.SetSink(this);
            }
        }
Beispiel #2
0
        internal override IProducerConsumer CreatePushChain(ConverterWriter converterWriter, Stream output)
        {
            this.inputEncoding = Encoding.Unicode;
            ConverterInput  input   = new ConverterUnicodeInput(converterWriter, true, 4096, this.testBoundaryConditions, null);
            ConverterOutput output2 = new ConverterEncodingOutput(output, true, false, this.outputEncodingSameAsInput ? Encoding.UTF8 : this.outputEncoding, this.outputEncodingSameAsInput, this.testBoundaryConditions, this);

            return(this.CreateChain(input, output2, converterWriter));
        }
Beispiel #3
0
        internal override IProducerConsumer CreatePushChain(ConverterWriter converterWriter, Stream output)
        {
            this.inputEncoding = Encoding.Unicode;
            ConverterInput input   = new ConverterUnicodeInput(converterWriter, true, 4096, this.testBoundaryConditions, null);
            FormatOutput   output2 = new RtfFormatOutput(output, true, false, this.testBoundaryConditions, this, null, this.testFormatTraceStream, this.testFormatOutputTraceStream, null);

            return(this.CreateChain(input, output2, converterWriter));
        }
Beispiel #4
0
        // Token: 0x06000FA9 RID: 4009 RVA: 0x000751B0 File Offset: 0x000733B0
        internal override IProducerConsumer CreatePushChain(ConverterWriter converterWriter, TextWriter output)
        {
            this.inputEncoding  = Encoding.Unicode;
            this.outputEncoding = Encoding.Unicode;
            ConverterInput  input   = new ConverterUnicodeInput(converterWriter, true, this.testMaxHtmlTagSize, this.testBoundaryConditions, null);
            ConverterOutput output2 = new ConverterUnicodeOutput(output, true, false);

            return(this.CreateChain(input, output2, converterWriter));
        }
        protected override void Dispose()
        {
            this.pullSource      = null;
            this.pushSource      = null;
            this.parseBuffer     = null;
            this.pushChunkBuffer = null;

            base.Dispose();
        }
Beispiel #6
0
        internal override IProducerConsumer CreatePushChain(ConverterWriter converterWriter, TextWriter output)
        {
            inputEncoding  = Encoding.Unicode;
            outputEncoding = Encoding.Unicode;

            ConverterInput converterIn = new ConverterUnicodeInput(
                converterWriter,
                true,
                maxHtmlTagSize,
                testBoundaryConditions,
                null);

            ConverterOutput converterOut = new ConverterUnicodeOutput(
                output,
                true,
                false);

            return(CreateChain(converterIn, converterOut, converterWriter as IProgressMonitor));
        }
Beispiel #7
0
        internal override IProducerConsumer CreatePushChain(ConverterWriter converterWriter, Stream output)
        {
            inputEncoding = Encoding.Unicode;

            ConverterInput converterIn = new ConverterUnicodeInput(
                converterWriter,
                true,
                maxHtmlTagSize,
                testBoundaryConditions,
                null);

            ConverterOutput converterOut = new ConverterEncodingOutput(
                output,
                true,
                false,
                outputEncodingSameAsInput ? Encoding.UTF8 : outputEncoding,
                outputEncodingSameAsInput,
                testBoundaryConditions,
                this as IResultsFeedback);

            return(CreateChain(converterIn, converterOut, converterWriter as IProgressMonitor));
        }
Beispiel #8
0
 internal abstract IProducerConsumer CreatePushChain(ConverterWriter converterWriter, TextWriter output);
Beispiel #9
0
 // Token: 0x06000FBA RID: 4026 RVA: 0x00075524 File Offset: 0x00073724
 internal override IProducerConsumer CreatePushChain(ConverterWriter converterWriter, TextWriter output)
 {
     throw new NotSupportedException(TextConvertersStrings.CannotUseConverterWriter);
 }