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

@ -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 (