Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -24,15 +24,10 @@
#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
#if NET_2_0
using System.Collections.Generic;
#else
using System.Collections.Specialized;
#endif
using System.Reflection;
using System.Reflection.Emit;
#if NET_2_0
using DictionaryEntry = System.Collections.Generic.KeyValuePair<
Mono.CodeGeneration.CodeVariableDeclaration,
Mono.CodeGeneration.CodeBlock>;
@@ -40,7 +35,6 @@ using ArrayList = System.Collections.Generic.List<
System.Collections.Generic.KeyValuePair<
Mono.CodeGeneration.CodeVariableDeclaration,
Mono.CodeGeneration.CodeBlock>>;
#endif
namespace Mono.CodeGeneration
{

View File

@@ -193,7 +193,6 @@ namespace Mono.Security.Protocol.Tls.Handshake.Client
ClientContext context = (ClientContext)this.Context;
AlertDescription description = AlertDescription.BadCertificate;
#if NET_2_0
if (context.SslStream.HaveRemoteValidation2Callback) {
ValidationResult res = context.SslStream.RaiseServerCertificateValidation2 (certificates);
if (res.Trusted)
@@ -217,7 +216,6 @@ namespace Mono.Security.Protocol.Tls.Handshake.Client
string err = String.Format ("0x{0:x}", error);
throw new TlsException (description, "Invalid certificate received from server. Error code: " + err);
}
#endif
// the leaf is the web server certificate
X509Certificate leaf = certificates [0];
X509Cert.X509Certificate cert = new X509Cert.X509Certificate (leaf.RawData);

View File

@@ -30,9 +30,7 @@
namespace System.ServiceModel.Activation
{
#if NET_4_0
[System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblySystemServiceModel_3_0)]
#endif
public class ServiceHostFactory : ServiceHostFactoryBase
{
[MonoTODO]
@@ -51,4 +49,4 @@ namespace System.ServiceModel.Activation
}
}
#endif
#endif

View File

@@ -82,9 +82,7 @@ namespace System.ServiceModel.Channels
public XmlDictionaryReaderQuotas ReaderQuotas {
get { return quotas; }
#if NET_4_0
set { quotas = value; }
#endif
}
public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (
@@ -156,12 +154,10 @@ namespace System.ServiceModel.Channels
}
#endif
#if NET_4_5
[MonoTODO]
public CompressionFormat CompressionFormat {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
#endif
}
}

View File

@@ -33,7 +33,6 @@ namespace System.ServiceModel.Channels
public class BindingParameterCollection
: KeyedByTypeCollection<object>
{
#if NET_4_5
protected override Type GetKeyForItem (object item)
{
return base.GetKeyForItem (item);
@@ -48,6 +47,5 @@ namespace System.ServiceModel.Channels
{
base.SetItem (index, item);
}
#endif
}
}

View File

@@ -38,9 +38,7 @@ namespace System.ServiceModel.Channels
{
internal class HttpChannelFactory<TChannel> : TransportChannelFactoryBase<TChannel>
{
#if NET_2_1 || NET_4_0
IHttpCookieContainerManager cookie_manager;
#endif
public HttpChannelFactory (HttpTransportBindingElement source, BindingContext ctx)
: base (source, ctx)
@@ -52,11 +50,9 @@ namespace System.ServiceModel.Channels
MessageEncoder = CreateEncoder<TChannel> (mbe);
continue;
}
#if NET_2_1 || NET_4_0
var tbe = be as HttpTransportBindingElement;
if (tbe != null)
cookie_manager = tbe.GetProperty<IHttpCookieContainerManager> (ctx);
#endif
}
if (MessageEncoder == null)
MessageEncoder = new TextMessageEncoder (MessageVersion.Default, Encoding.UTF8);
@@ -109,10 +105,8 @@ namespace System.ServiceModel.Channels
public override T GetProperty<T> ()
{
#if NET_2_1 || NET_4_0
if (cookie_manager is T)
return (T) (object) cookie_manager;
#endif
return base.GetProperty<T> ();
}
}

View File

@@ -4,9 +4,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Channels
{
#if NET_4_0
[Obsolete ("Use AllowCookies.")]
#endif
public class HttpCookieContainerBindingElement : BindingElement
{
HttpCookieContainerManager manager;

View File

@@ -90,12 +90,10 @@ namespace System.ServiceModel.Channels
result.WebRequest = web_request;
web_request.Method = "POST";
web_request.ContentType = Encoder.ContentType;
#if NET_2_1 || NET_4_0
HttpWebRequest hwr = (web_request as HttpWebRequest);
var cmgr = source.GetProperty<IHttpCookieContainerManager> ();
if (cmgr != null)
hwr.CookieContainer = cmgr.CookieContainer;
#endif
// client authentication (while SL3 has NetworkCredential class, it is not implemented yet. So, it is non-SL only.)
var httpbe = (HttpTransportBindingElement) source.Transport;
@@ -167,11 +165,9 @@ namespace System.ServiceModel.Channels
case "Expect":
web_request.Expect = hp.Headers [key];
break;
#if NET_4_0
case "Host":
web_request.Host = hp.Headers [key];
break;
#endif
//case "If-Modified-Since":
// web_request.IfModifiedSince = hp.Headers [key];
// break;

View File

@@ -31,9 +31,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Channels
{
public sealed class HttpRequestMessageProperty
#if NET_4_5
: IMessageProperty
#endif
{
public static string Name {
get { return "httpRequest"; }
@@ -67,7 +65,6 @@ namespace System.ServiceModel.Channels
}
#if NET_4_5
IMessageProperty IMessageProperty.CreateCopy ()
{
var copy = new HttpRequestMessageProperty ();
@@ -78,6 +75,5 @@ namespace System.ServiceModel.Channels
copy.suppress_entity = suppress_entity;
return copy;
}
#endif
}
}

View File

@@ -31,9 +31,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Channels
{
public sealed class HttpResponseMessageProperty
#if NET_4_5
: IMessageProperty
#endif
{
public static string Name {
get { return "httpResponse"; }
@@ -67,7 +65,6 @@ namespace System.ServiceModel.Channels
set { suppress_entity = value; }
}
#if NET_4_5
IMessageProperty IMessageProperty.CreateCopy ()
{
var copy = new HttpResponseMessageProperty ();
@@ -78,6 +75,5 @@ namespace System.ServiceModel.Channels
copy.suppress_entity = suppress_entity;
return copy;
}
#endif
}
}

View File

@@ -30,9 +30,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Net;
using System.Net.Security;
#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
#endif
using System.ServiceModel.Channels;
#if !NET_2_1
using System.ServiceModel.Channels.Http;
@@ -62,9 +60,7 @@ namespace System.ServiceModel.Channels
AuthenticationSchemes proxy_auth_scheme =
AuthenticationSchemes.Anonymous;
// If you add fields, do not forget them in copy constructor.
#if NET_4_0
HttpCookieContainerManager cookie_manager;
#endif
public HttpTransportBindingElement ()
{
@@ -89,88 +85,66 @@ namespace System.ServiceModel.Channels
auth_scheme = other.auth_scheme;
proxy_auth_scheme = other.proxy_auth_scheme;
#if NET_4_0
DecompressionEnabled = other.DecompressionEnabled;
LegacyExtendedProtectionPolicy = other.LegacyExtendedProtectionPolicy;
ExtendedProtectionPolicy = other.ExtendedProtectionPolicy;
cookie_manager = other.cookie_manager;
#endif
}
#if NET_4_0
[DefaultValue (AuthenticationSchemes.Anonymous)]
#endif
public AuthenticationSchemes AuthenticationScheme {
get { return auth_scheme; }
set { auth_scheme = value; }
}
#if NET_4_0
[DefaultValue (AuthenticationSchemes.Anonymous)]
#endif
public AuthenticationSchemes ProxyAuthenticationScheme {
get { return proxy_auth_scheme; }
set { proxy_auth_scheme = value; }
}
#if NET_4_0
[DefaultValue (false)]
#endif
public bool AllowCookies {
get { return allow_cookies; }
set { allow_cookies = value; }
}
#if NET_4_0
[DefaultValue (false)]
#endif
public bool BypassProxyOnLocal {
get { return bypass_proxy_on_local; }
set { bypass_proxy_on_local = value; }
}
#if NET_4_0
[DefaultValue (false)]
[MonoTODO]
public bool DecompressionEnabled { get; set; }
#endif
#if NET_4_0
[DefaultValue (HostNameComparisonMode.StrongWildcard)]
#endif
public HostNameComparisonMode HostNameComparisonMode {
get { return host_cmp_mode; }
set { host_cmp_mode = value; }
}
#if NET_4_0
[DefaultValue (true)]
#endif
public bool KeepAliveEnabled {
get { return keep_alive_enabled; }
set { keep_alive_enabled = value; }
}
#if NET_4_0
[DefaultValue (0x10000)]
#endif
public int MaxBufferSize {
get { return max_buffer_size; }
set { max_buffer_size = value; }
}
#if NET_4_0
[DefaultValue (null)]
[TypeConverter (typeof (UriTypeConverter))]
#endif
public Uri ProxyAddress {
get { return proxy_address; }
set { proxy_address = value; }
}
#if NET_4_0
[DefaultValue ("")]
#endif
public string Realm {
get { return realm; }
set { realm = value; }
@@ -180,38 +154,30 @@ namespace System.ServiceModel.Channels
get { return Uri.UriSchemeHttp; }
}
#if NET_4_0
[DefaultValue (TransferMode.Buffered)]
#endif
public TransferMode TransferMode {
get { return transfer_mode; }
set { transfer_mode = value; }
}
#if NET_4_0
[DefaultValue (false)]
#endif
public bool UnsafeConnectionNtlmAuthentication {
get { return unsafe_ntlm_auth; }
set { unsafe_ntlm_auth = value; }
}
#if NET_4_0
[DefaultValue (true)]
#endif
public bool UseDefaultWebProxy {
get { return use_default_proxy; }
set { use_default_proxy = value; }
}
#if NET_4_0
[Obsolete ("Use ExtendedProtectionPolicy")]
[MonoTODO]
public object LegacyExtendedProtectionPolicy { get; set; }
[MonoTODO]
public ExtendedProtectionPolicy ExtendedProtectionPolicy { get; set; }
#endif
public override bool CanBuildChannelFactory<TChannel> (
BindingContext context)
@@ -261,7 +227,6 @@ namespace System.ServiceModel.Channels
return (T) (object) new HttpBindingProperties (this);
if (typeof (T) == typeof (TransferMode))
return (T) (object) TransferMode;
#if NET_4_0
if (typeof(T) == typeof(IHttpCookieContainerManager)) {
if (!AllowCookies)
return null;
@@ -269,16 +234,13 @@ namespace System.ServiceModel.Channels
cookie_manager = new HttpCookieContainerManager ();
return (T) (object) cookie_manager;
}
#endif
return base.GetProperty<T> (context);
}
#if NET_4_5
public WebSocketTransportSettings WebSocketSettings {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
#endif
#if !NET_2_1
void IPolicyExportExtension.ExportPolicy (

View File

@@ -1,4 +1,3 @@
#if NET_2_1 || NET_4_0
using System;
using System.Net;
@@ -10,4 +9,3 @@ namespace System.ServiceModel.Channels
CookieContainer CookieContainer { get; set; }
}
}
#endif

View File

@@ -94,7 +94,6 @@ namespace System.ServiceModel.Channels
Close ();
}
#if NET_4_5
public T GetBody<T> ()
{
return OnGetBody<T> (GetReaderAtBodyContents ());
@@ -111,17 +110,6 @@ namespace System.ServiceModel.Channels
var xmlFormatter = new DataContractSerializer (typeof (T));
return (T)xmlFormatter.ReadObject (reader);
}
#else
public T GetBody<T> ()
{
return GetBody<T> (new DataContractSerializer (typeof (T)));
}
public T GetBody<T> (XmlObjectSerializer xmlFormatter)
{
return (T) xmlFormatter.ReadObject (GetReaderAtBodyContents ());
}
#endif
public string GetBodyAttribute (string localName, string ns)
{
@@ -180,7 +168,8 @@ namespace System.ServiceModel.Channels
if (!IsEmpty) {
if (copied_message != null)
copied_message.WriteBodyContents (writer);
OnWriteBodyContents (writer);
else
OnWriteBodyContents (writer);
}
else if (Version.Envelope == EnvelopeVersion.None)
WriteXsiNil (writer);

View File

@@ -29,11 +29,13 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Net.Security;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
using System.Threading;
using System.Xml;
namespace System.ServiceModel.Channels
{
@@ -124,12 +126,29 @@ namespace System.ServiceModel.Channels
}
try {
return TryReceiveRequest (tout, out ctx);
} catch (XmlException ex) {
Console.WriteLine ("Xml Exception (Dropped Connection?):" + ex.Message);
//on dropped connection,
//whatever you do don't crash
//the whole app. Ignore for now
} catch (SocketException ex) {
Console.WriteLine ("Socket Exception (Dropped Connection?):" + ex.Message);
//on dropped connection,
//whatever you do don't crash
//the whole app. Ignore for now
} catch (IOException ex) {
Console.WriteLine ("I/O Exception (Dropped Connection?):" + ex.Message);
//on dropped connection,
//whatever you do don't crash
//the whole app. Ignore for now
} finally {
lock (async_result_lock) {
CurrentAsyncResult = null;
CurrentAsyncThread = null;
}
}
ctx = null;
return false;
});
RequestContext dummy;
IAsyncResult result;

View File

@@ -88,9 +88,7 @@ namespace System.ServiceModel.Channels
public XmlDictionaryReaderQuotas ReaderQuotas {
get { return quotas; }
#if NET_4_0
set { quotas = value; }
#endif
}
public Encoding WriteEncoding {

View File

@@ -23,7 +23,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_5
using System;
namespace System.ServiceModel.Channels {
@@ -64,4 +63,3 @@ namespace System.ServiceModel.Channels {
}
}
#endif

View File

@@ -23,7 +23,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_5
namespace System.ServiceModel.Channels {
public enum WebSocketTransportUsage {
WhenDuplex,
@@ -31,4 +30,3 @@ namespace System.ServiceModel.Channels {
Never
}
}
#endif

View File

@@ -31,229 +31,3 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_4_5
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Configuration;
using System.Net;
using System.Net.Security;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
using System.IdentityModel.Tokens;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.ServiceModel.MsmqIntegration;
using System.ServiceModel.PeerResolvers;
using System.ServiceModel.Security;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public class BasicHttpBindingElement
: StandardBindingElement, IBindingConfigurationElement
{
ConfigurationPropertyCollection _properties;
public BasicHttpBindingElement ()
{
}
public BasicHttpBindingElement (string name) : base (name) { }
// Properties
[ConfigurationProperty ("allowCookies",
DefaultValue = false,
Options = ConfigurationPropertyOptions.None)]
public bool AllowCookies {
get { return (bool) this ["allowCookies"]; }
set { this ["allowCookies"] = value; }
}
protected override Type BindingElementType {
get { return typeof (BasicHttpBinding); }
}
[ConfigurationProperty ("bypassProxyOnLocal",
DefaultValue = false,
Options = ConfigurationPropertyOptions.None)]
public bool BypassProxyOnLocal {
get { return (bool) this ["bypassProxyOnLocal"]; }
set { this ["bypassProxyOnLocal"] = value; }
}
[ConfigurationProperty ("hostNameComparisonMode",
DefaultValue = "StrongWildcard",
Options = ConfigurationPropertyOptions.None)]
public HostNameComparisonMode HostNameComparisonMode {
get { return (HostNameComparisonMode) this ["hostNameComparisonMode"]; }
set { this ["hostNameComparisonMode"] = value; }
}
[LongValidator ( MinValue = 0,
MaxValue = 9223372036854775807,
ExcludeRange = false)]
[ConfigurationProperty ("maxBufferPoolSize",
DefaultValue = "524288",
Options = ConfigurationPropertyOptions.None)]
public long MaxBufferPoolSize {
get { return (long) this ["maxBufferPoolSize"]; }
set { this ["maxBufferPoolSize"] = value; }
}
[IntegerValidator ( MinValue = 1,
MaxValue = int.MaxValue,
ExcludeRange = false)]
[ConfigurationProperty ("maxBufferSize",
DefaultValue = "65536",
Options = ConfigurationPropertyOptions.None)]
public int MaxBufferSize {
get { return (int) this ["maxBufferSize"]; }
set { this ["maxBufferSize"] = value; }
}
[LongValidator ( MinValue = 1,
MaxValue = 9223372036854775807,
ExcludeRange = false)]
[ConfigurationProperty ("maxReceivedMessageSize",
DefaultValue = "65536",
Options = ConfigurationPropertyOptions.None)]
public long MaxReceivedMessageSize {
get { return (long) this ["maxReceivedMessageSize"]; }
set { this ["maxReceivedMessageSize"] = value; }
}
[ConfigurationProperty ("messageEncoding",
DefaultValue = "Text",
Options = ConfigurationPropertyOptions.None)]
public WSMessageEncoding MessageEncoding {
get { return (WSMessageEncoding) this ["messageEncoding"]; }
set { this ["messageEncoding"] = value; }
}
protected override ConfigurationPropertyCollection Properties {
get {
if (_properties == null) {
_properties = base.Properties;
_properties.Add (new ConfigurationProperty ("allowCookies", typeof (bool), "false", null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("bypassProxyOnLocal", typeof (bool), "false", null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("hostNameComparisonMode", typeof (HostNameComparisonMode), "StrongWildcard", null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("maxBufferPoolSize", typeof (long), "524288", null, new LongValidator (0, 9223372036854775807, false), ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("maxBufferSize", typeof (int), "65536", null, new IntegerValidator (1, int.MaxValue, false), ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("maxReceivedMessageSize", typeof (long), "65536", null, new LongValidator (1, 9223372036854775807, false), ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("messageEncoding", typeof (WSMessageEncoding), "Text", null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("proxyAddress", typeof (Uri), null, new UriTypeConverter (), null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("readerQuotas", typeof (XmlDictionaryReaderQuotasElement), null, null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("security", typeof (BasicHttpSecurityElement), null, null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("textEncoding", typeof (Encoding), BasicHttpBinding.DefaultTextEncoding, EncodingConverter.Instance, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("transferMode", typeof (TransferMode), "Buffered", null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("useDefaultWebProxy", typeof (bool), "true", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
}
return _properties;
}
}
[ConfigurationProperty ("proxyAddress",
DefaultValue = null,
Options = ConfigurationPropertyOptions.None)]
public Uri ProxyAddress {
get { return (Uri) this ["proxyAddress"]; }
set { this ["proxyAddress"] = value; }
}
[ConfigurationProperty ("readerQuotas",
Options = ConfigurationPropertyOptions.None)]
public XmlDictionaryReaderQuotasElement ReaderQuotas {
get { return (XmlDictionaryReaderQuotasElement) this ["readerQuotas"]; }
}
[ConfigurationProperty ("security",
Options = ConfigurationPropertyOptions.None)]
public BasicHttpSecurityElement Security {
get { return (BasicHttpSecurityElement) this ["security"]; }
}
[TypeConverter (typeof (EncodingConverter))]
[ConfigurationProperty ("textEncoding",
DefaultValue = "utf-8",
Options = ConfigurationPropertyOptions.None)]
public Encoding TextEncoding {
get { return (Encoding) this ["textEncoding"]; }
set { this ["textEncoding"] = value; }
}
[ConfigurationProperty ("transferMode",
DefaultValue = "Buffered",
Options = ConfigurationPropertyOptions.None)]
public TransferMode TransferMode {
get { return (TransferMode) this ["transferMode"]; }
set { this ["transferMode"] = value; }
}
[ConfigurationProperty ("useDefaultWebProxy",
DefaultValue = true,
Options = ConfigurationPropertyOptions.None)]
public bool UseDefaultWebProxy {
get { return (bool) this ["useDefaultWebProxy"]; }
set { this ["useDefaultWebProxy"] = value; }
}
protected override void OnApplyConfiguration (Binding binding)
{
BasicHttpBinding basicHttpBinding = (BasicHttpBinding) binding;
basicHttpBinding.AllowCookies = AllowCookies;
basicHttpBinding.BypassProxyOnLocal = BypassProxyOnLocal;
basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode;
basicHttpBinding.MaxBufferPoolSize = MaxBufferPoolSize;
basicHttpBinding.MaxBufferSize = MaxBufferSize;
basicHttpBinding.MaxReceivedMessageSize = MaxReceivedMessageSize;
basicHttpBinding.MessageEncoding = MessageEncoding;
basicHttpBinding.ProxyAddress = ProxyAddress;
ReaderQuotas.ApplyConfiguration (basicHttpBinding.ReaderQuotas);
basicHttpBinding.Security.Mode = Security.Mode;
Security.Transport.ApplyConfiguration (basicHttpBinding.Security.Transport);
basicHttpBinding.TextEncoding = TextEncoding;
basicHttpBinding.TransferMode = TransferMode;
basicHttpBinding.UseDefaultWebProxy = UseDefaultWebProxy;
}
protected internal override void InitializeFrom (Binding binding)
{
BasicHttpBinding b = (BasicHttpBinding) binding;
base.InitializeFrom (binding);
AllowCookies = b.AllowCookies;
BypassProxyOnLocal = b.BypassProxyOnLocal;
HostNameComparisonMode = b.HostNameComparisonMode;
MaxBufferPoolSize = b.MaxBufferPoolSize;
MaxBufferSize = b.MaxBufferSize;
MaxReceivedMessageSize = b.MaxReceivedMessageSize;
MessageEncoding = b.MessageEncoding;
ProxyAddress = b.ProxyAddress;
ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
Security.Mode = b.Security.Mode;
Security.Transport.ApplyConfiguration (b.Security.Transport);
TextEncoding = b.TextEncoding;
TransferMode = b.TransferMode;
UseDefaultWebProxy = b.UseDefaultWebProxy;
}
}
}
#endif

View File

@@ -68,13 +68,11 @@ namespace System.ServiceModel.Configuration
get { return (BasicHttpBindingCollectionElement) this ["basicHttpBinding"]; }
}
#if NET_4_5
[ConfigurationProperty ("basicHttpsBinding",
Options = ConfigurationPropertyOptions.None)]
public BasicHttpsBindingCollectionElement BasicHttpsBinding {
get { return (BasicHttpsBindingCollectionElement) this ["basicHttpsBinding"]; }
}
#endif
public List<BindingCollectionElement> BindingCollections {
get {

View File

@@ -68,10 +68,8 @@ namespace System.ServiceModel.Configuration
static ConfigurationProperty headers;
static ConfigurationProperty identity;
static ConfigurationProperty name;
#if NET_4_0
static ConfigurationProperty endpoint_configuration;
static ConfigurationProperty kind;
#endif
static ChannelEndpointElement ()
{
@@ -108,10 +106,8 @@ namespace System.ServiceModel.Configuration
typeof (string), "", new StringConverter (), null,
ConfigurationPropertyOptions.IsKey);
#if NET_4_0
endpoint_configuration = new ConfigurationProperty ("endpointConfiguration", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
kind = new ConfigurationProperty ("kind", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
#endif
properties.Add (address);
properties.Add (behavior_configuration);
@@ -122,10 +118,8 @@ namespace System.ServiceModel.Configuration
properties.Add (identity);
properties.Add (name);
#if NET_4_0
properties.Add (endpoint_configuration);
properties.Add (kind);
#endif
}
public ChannelEndpointElement ()
@@ -211,7 +205,6 @@ namespace System.ServiceModel.Configuration
set { base [name] = value; }
}
#if NET_4_0
[StringValidator (MinLength = 0)]
[ConfigurationProperty ("endpointConfiguration", DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)]
public string EndpointConfiguration {
@@ -225,7 +218,6 @@ namespace System.ServiceModel.Configuration
get { return (string) base [kind]; }
set { base [kind] = value; }
}
#endif
protected override ConfigurationPropertyCollection Properties {
get { return properties; }

Some files were not shown because too many files have changed in this diff Show More