public MultiplexingFormatMapping(Encoding writeEncoding, WebContentTypeMapper contentTypeMapper)
 {
     if (writeEncoding == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("writeEncoding");
     }
     this.writeEncoding = writeEncoding;
     this.writeCharset = TextEncoderDefaults.EncodingToCharSet(writeEncoding);
     this.contentTypeMapper = contentTypeMapper;
 }
 WebMessageEncodingBindingElement(WebMessageEncodingBindingElement elementToBeCloned)
     : base(elementToBeCloned)
 {
     this.maxReadPoolSize  = elementToBeCloned.maxReadPoolSize;
     this.maxWritePoolSize = elementToBeCloned.maxWritePoolSize;
     this.readerQuotas     = new XmlDictionaryReaderQuotas();
     elementToBeCloned.readerQuotas.CopyTo(this.readerQuotas);
     this.writeEncoding     = elementToBeCloned.writeEncoding;
     this.contentTypeMapper = elementToBeCloned.contentTypeMapper;
     this.CrossDomainScriptAccessEnabled = elementToBeCloned.CrossDomainScriptAccessEnabled;
 }
            public WebMessageEncoder(Encoding writeEncoding, int maxReadPoolSize, int maxWritePoolSize, XmlDictionaryReaderQuotas quotas, WebContentTypeMapper contentTypeMapper, bool javascriptCallbackEnabled)
            {
                if (writeEncoding == null)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("writeEncoding");
                }

                this.thisLock = new object();

                TextEncoderDefaults.ValidateEncoding(writeEncoding);
                this.writeEncoding = writeEncoding;

                this.maxReadPoolSize = maxReadPoolSize;
                this.maxWritePoolSize = maxWritePoolSize;
                this.contentTypeMapper = contentTypeMapper;
                this.javascriptCallbackEnabled = javascriptCallbackEnabled;

                this.readerQuotas = new XmlDictionaryReaderQuotas();
                quotas.CopyTo(this.readerQuotas);

                this.defaultContentType = GetContentType(defaultMediaType, writeEncoding);
            }
Esempio n. 4
0
            public WebMessageEncoder(Encoding writeEncoding, int maxReadPoolSize, int maxWritePoolSize, XmlDictionaryReaderQuotas quotas, WebContentTypeMapper contentTypeMapper, bool javascriptCallbackEnabled)
            {
                if (writeEncoding == null)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("writeEncoding");
                }

                this.thisLock = new object();

                TextEncoderDefaults.ValidateEncoding(writeEncoding);
                this.writeEncoding = writeEncoding;

                this.maxReadPoolSize           = maxReadPoolSize;
                this.maxWritePoolSize          = maxWritePoolSize;
                this.contentTypeMapper         = contentTypeMapper;
                this.javascriptCallbackEnabled = javascriptCallbackEnabled;

                this.readerQuotas = new XmlDictionaryReaderQuotas();
                quotas.CopyTo(this.readerQuotas);

                this.defaultContentType = GetContentType(defaultMediaType, writeEncoding);
            }
 public WebMessageEncoderFactory(Encoding writeEncoding, int maxReadPoolSize, int maxWritePoolSize, XmlDictionaryReaderQuotas quotas, WebContentTypeMapper contentTypeMapper, bool javascriptCallbackEnabled)
 {
     messageEncoder = new WebMessageEncoder(writeEncoding, maxReadPoolSize, maxWritePoolSize, quotas, contentTypeMapper, javascriptCallbackEnabled);
 }
Esempio n. 6
0
 public WebMessageEncoderFactory(Encoding writeEncoding, int maxReadPoolSize, int maxWritePoolSize, XmlDictionaryReaderQuotas quotas, WebContentTypeMapper contentTypeMapper, bool javascriptCallbackEnabled)
 {
     messageEncoder = new WebMessageEncoder(writeEncoding, maxReadPoolSize, maxWritePoolSize, quotas, contentTypeMapper, javascriptCallbackEnabled);
 }
 public XmlFormatMapping(Encoding writeEncoding, WebContentTypeMapper contentTypeMapper)
     : base(writeEncoding, contentTypeMapper)
 { }