Example #1
0
 public BinaryMessageEncodingBindingElement()
 {
     _maxReadPoolSize  = EncoderDefaults.MaxReadPoolSize;
     _maxWritePoolSize = EncoderDefaults.MaxWritePoolSize;
     _readerQuotas     = new XmlDictionaryReaderQuotas();
     EncoderDefaults.ReaderQuotas.CopyTo(_readerQuotas);
     _maxSessionSize    = BinaryEncoderDefaults.MaxSessionSize;
     _binaryVersion     = BinaryEncoderDefaults.BinaryVersion;
     _messageVersion    = MessageVersion.CreateVersion(BinaryEncoderDefaults.EnvelopeVersion);
     _compressionFormat = EncoderDefaults.DefaultCompressionFormat;
 }
 public BinaryMessageEncoderFactory(System.ServiceModel.Channels.MessageVersion messageVersion, int maxReadPoolSize, int maxWritePoolSize, int maxSessionSize, XmlDictionaryReaderQuotas readerQuotas, BinaryVersion version)
 {
     this.messageVersion        = messageVersion;
     this.messageEncoder        = new BinaryMessageEncoder(this, false, 0);
     this.maxReadPoolSize       = maxReadPoolSize;
     this.maxWritePoolSize      = maxWritePoolSize;
     this.maxSessionSize        = maxSessionSize;
     this.thisLock              = new object();
     this.onStreamedReaderClose = new OnXmlDictionaryReaderClose(this.ReturnStreamedReader);
     this.readerQuotas          = new XmlDictionaryReaderQuotas();
     if (readerQuotas != null)
     {
         readerQuotas.CopyTo(this.readerQuotas);
     }
     this.binaryVersion = version;
 }
 public BinaryMessageEncoderFactory(System.ServiceModel.Channels.MessageVersion messageVersion, int maxReadPoolSize, int maxWritePoolSize, int maxSessionSize, XmlDictionaryReaderQuotas readerQuotas, BinaryVersion version)
 {
     this.messageVersion = messageVersion;
     this.messageEncoder = new BinaryMessageEncoder(this, false, 0);
     this.maxReadPoolSize = maxReadPoolSize;
     this.maxWritePoolSize = maxWritePoolSize;
     this.maxSessionSize = maxSessionSize;
     this.thisLock = new object();
     this.onStreamedReaderClose = new OnXmlDictionaryReaderClose(this.ReturnStreamedReader);
     this.readerQuotas = new XmlDictionaryReaderQuotas();
     if (readerQuotas != null)
     {
         readerQuotas.CopyTo(this.readerQuotas);
     }
     this.binaryVersion = version;
 }
Example #4
0
        public BinaryMessageEncoderFactory(MessageVersion messageVersion, int maxReadPoolSize, int maxWritePoolSize, int maxSessionSize,
            XmlDictionaryReaderQuotas readerQuotas, long maxReceivedMessageSize, BinaryVersion version, CompressionFormat compressionFormat)
        {
            _messageVersion = messageVersion;
            _maxReadPoolSize = maxReadPoolSize;
            _maxWritePoolSize = maxWritePoolSize;
            _maxSessionSize = maxSessionSize;
            _thisLock = new object();

            _readerQuotas = new XmlDictionaryReaderQuotas();
            if (readerQuotas != null)
            {
                readerQuotas.CopyTo(_readerQuotas);
            }

            _bufferedReadReaderQuotas = EncoderHelpers.GetBufferedReadQuotas(_readerQuotas);
            this.MaxReceivedMessageSize = maxReceivedMessageSize;

            _binaryVersion = version;
            _compressionFormat = compressionFormat;
            _messageEncoder = new BinaryMessageEncoder(this, false, 0);
        }
        public BinaryMessageEncoderFactory(MessageVersion messageVersion, int maxReadPoolSize, int maxWritePoolSize, int maxSessionSize,
            XmlDictionaryReaderQuotas readerQuotas, long maxReceivedMessageSize, BinaryVersion version, CompressionFormat compressionFormat)
        {
            this.messageVersion = messageVersion;
            this.maxReadPoolSize = maxReadPoolSize;
            this.maxWritePoolSize = maxWritePoolSize;
            this.maxSessionSize = maxSessionSize;
            this.thisLock = new object();
            this.onStreamedReaderClose = new OnXmlDictionaryReaderClose(ReturnStreamedReader);
            this.readerQuotas = new XmlDictionaryReaderQuotas();
            if (readerQuotas != null)
            {
                readerQuotas.CopyTo(this.readerQuotas);
            }

            this.bufferedReadReaderQuotas = EncoderHelpers.GetBufferedReadQuotas(this.readerQuotas);
            this.MaxReceivedMessageSize = maxReceivedMessageSize;

            this.binaryVersion = version;
            this.compressionFormat = compressionFormat;
            this.messageEncoder = new BinaryMessageEncoder(this, false, 0);
        }