mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
116 lines
5.2 KiB
C#
116 lines
5.2 KiB
C#
//------------------------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace System.ServiceModel.Configuration
|
|
{
|
|
using System.ComponentModel;
|
|
using System.Configuration;
|
|
using System.Globalization;
|
|
using System.ServiceModel.Channels;
|
|
using System.Text;
|
|
|
|
public sealed partial class MtomMessageEncodingElement : BindingElementExtensionElement
|
|
{
|
|
public MtomMessageEncodingElement()
|
|
{
|
|
}
|
|
|
|
public override void ApplyConfiguration(BindingElement bindingElement)
|
|
{
|
|
base.ApplyConfiguration(bindingElement);
|
|
MtomMessageEncodingBindingElement binding = (MtomMessageEncodingBindingElement)bindingElement;
|
|
binding.MessageVersion = this.MessageVersion;
|
|
binding.WriteEncoding = this.WriteEncoding;
|
|
binding.MaxReadPoolSize = this.MaxReadPoolSize;
|
|
binding.MaxWritePoolSize = this.MaxWritePoolSize;
|
|
#pragma warning suppress 56506 //[....]; base.ApplyConfiguration() checks for 'binding' being null
|
|
this.ReaderQuotas.ApplyConfiguration(binding.ReaderQuotas);
|
|
binding.MaxBufferSize = this.MaxBufferSize;
|
|
}
|
|
|
|
public override Type BindingElementType
|
|
{
|
|
get { return typeof(MtomMessageEncodingBindingElement); }
|
|
}
|
|
|
|
public override void CopyFrom(ServiceModelExtensionElement from)
|
|
{
|
|
base.CopyFrom(from);
|
|
|
|
MtomMessageEncodingElement source = (MtomMessageEncodingElement)from;
|
|
#pragma warning suppress 56506 //[....]; base.CopyFrom() checks for 'from' being null
|
|
this.MessageVersion = source.MessageVersion;
|
|
this.WriteEncoding = source.WriteEncoding;
|
|
this.MaxReadPoolSize = source.MaxReadPoolSize;
|
|
this.MaxWritePoolSize = source.MaxWritePoolSize;
|
|
this.MaxBufferSize = source.MaxBufferSize;
|
|
}
|
|
|
|
protected internal override BindingElement CreateBindingElement()
|
|
{
|
|
MtomMessageEncodingBindingElement binding = new MtomMessageEncodingBindingElement();
|
|
this.ApplyConfiguration(binding);
|
|
return binding;
|
|
}
|
|
|
|
protected internal override void InitializeFrom(BindingElement bindingElement)
|
|
{
|
|
base.InitializeFrom(bindingElement);
|
|
MtomMessageEncodingBindingElement binding = (MtomMessageEncodingBindingElement)bindingElement;
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MessageVersion, binding.MessageVersion);
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.WriteEncoding, binding.WriteEncoding);
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxReadPoolSize, binding.MaxReadPoolSize);
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxWritePoolSize, binding.MaxWritePoolSize);
|
|
this.ReaderQuotas.InitializeFrom(binding.ReaderQuotas);
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxBufferSize, binding.MaxBufferSize);
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.MaxReadPoolSize, DefaultValue = EncoderDefaults.MaxReadPoolSize)]
|
|
[IntegerValidator(MinValue = 1)]
|
|
public int MaxReadPoolSize
|
|
{
|
|
get { return (int)base[ConfigurationStrings.MaxReadPoolSize]; }
|
|
set { base[ConfigurationStrings.MaxReadPoolSize] = value; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.MaxWritePoolSize, DefaultValue = EncoderDefaults.MaxWritePoolSize)]
|
|
[IntegerValidator(MinValue = 1)]
|
|
public int MaxWritePoolSize
|
|
{
|
|
get { return (int)base[ConfigurationStrings.MaxWritePoolSize]; }
|
|
set { base[ConfigurationStrings.MaxWritePoolSize] = value; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.MessageVersion, DefaultValue = TextEncoderDefaults.MessageVersionString)]
|
|
[TypeConverter(typeof(MessageVersionConverter))]
|
|
public MessageVersion MessageVersion
|
|
{
|
|
get { return (MessageVersion)base[ConfigurationStrings.MessageVersion]; }
|
|
set { base[ConfigurationStrings.MessageVersion] = value; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.ReaderQuotas)]
|
|
public XmlDictionaryReaderQuotasElement ReaderQuotas
|
|
{
|
|
get { return (XmlDictionaryReaderQuotasElement) base[ConfigurationStrings.ReaderQuotas]; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.MaxBufferSize, DefaultValue = MtomEncoderDefaults.MaxBufferSize)]
|
|
[IntegerValidator(MinValue = 1)]
|
|
public int MaxBufferSize
|
|
{
|
|
get { return (int)base[ConfigurationStrings.MaxBufferSize]; }
|
|
set { base[ConfigurationStrings.MaxBufferSize] = value; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.WriteEncoding, DefaultValue = TextEncoderDefaults.EncodingString)]
|
|
[TypeConverter(typeof(EncodingConverter))]
|
|
public Encoding WriteEncoding
|
|
{
|
|
get { return (Encoding)base[ConfigurationStrings.WriteEncoding]; }
|
|
set { base[ConfigurationStrings.WriteEncoding] = value; }
|
|
}
|
|
}
|
|
}
|