Example #1
0
        public QuotedPrintableCodec(QuotedPrintableSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            Settings = settings.ToReadOnly();
        }
            public Encoder(QuotedPrintableSettings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                _encoder = new QpEncoder(settings);
            }
        public QuotedPrintableSettings(QuotedPrintableSettings inheritedSettings)
            : this(true)
        {
            if (inheritedSettings == null)
            {
                throw new ArgumentNullException(nameof(inheritedSettings));
            }

            InheritSettings(inheritedSettings);

            _decodingHardBreak = inheritedSettings._decodingHardBreak;
        }
Example #4
0
            public QpDecoder(QuotedPrintableSettings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                // initialize all fields to default values..
                this = default;

                settings.GetDecoderSettings(
                    out _decodingTable,
                    out _hexDecodingTable,
                    out _hardBreakBytes,
                    out _flags);

                Reset();
            }
Example #5
0
            public QpEncoder(QuotedPrintableSettings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                // initialize all fields to defaults..
                this = default;

                settings.GetEncoderSettings(
                    out _safeCharacters,
                    out _flags,
                    out _lineSeparator,
                    out _maximumLineLength,
                    out _hexCharacters);

                // decrement maximumLineLength to account for required soft-breaks
                // at the end of lines..

                _maximumLineLength--;

                Reset();
            }
Example #6
0
 public Decoder(QuotedPrintableSettings settings)
 {
     _codecDecoder = new QpDecoder(settings);
 }
 private QuotedPrintableSettings(QuotedPrintableSettings inheritedSettings, bool isProtected)
     : this(inheritedSettings)
 {
     IsProtected = isProtected;
 }