Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -94,7 +94,7 @@ namespace System.ServiceModel.Channels
return base.BuildChannelFactory<TChannel> (context);
}
#if !NET_2_1
#if !MOBILE
public override IChannelListener<TChannel> BuildChannelListener<TChannel> (
BindingContext context)
{
@@ -131,7 +131,7 @@ namespace System.ServiceModel.Channels
return new BinaryMessageEncoderFactory (this);
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO]
void IWsdlExportExtension.ExportContract (WsdlExporter exporter,
WsdlContractConversionContext context)

View File

@@ -133,7 +133,7 @@ namespace System.ServiceModel.Channels
return CreateContext (parameters).BuildInnerChannelFactory<TChannel> ();
}
#if !NET_2_1
#if !MOBILE
public virtual IChannelListener<TChannel>
BuildChannelListener<TChannel> (
Uri listenUriBaseAddress,
@@ -267,7 +267,7 @@ namespace System.ServiceModel.Channels
return CreateContext (parameters).CanBuildInnerChannelFactory<TChannel> ();
}
#if !NET_2_1
#if !MOBILE
public bool CanBuildChannelListener<TChannel> (
params object [] parameters)
where TChannel : class, IChannel

View File

@@ -149,7 +149,7 @@ namespace System.ServiceModel.Channels
return ctx.DequeueBindingElement ().BuildChannelFactory<TChannel> (ctx);
}
#if !NET_2_1
#if !MOBILE
public IChannelListener<TChannel>
BuildInnerChannelListener<TChannel> ()
where TChannel : class, IChannel
@@ -168,7 +168,7 @@ namespace System.ServiceModel.Channels
return ctx.DequeueBindingElement ().CanBuildChannelFactory<TChannel> (ctx);
}
#if !NET_2_1
#if !MOBILE
public bool CanBuildInnerChannelListener<TChannel> ()
where TChannel : class, IChannel
{

View File

@@ -52,7 +52,7 @@ namespace System.ServiceModel.Channels
return context.BuildInnerChannelFactory<TChannel> ();
}
#if !NET_2_1
#if !MOBILE
public virtual IChannelListener<TChannel>
BuildChannelListener<TChannel> (
BindingContext context)
@@ -70,7 +70,7 @@ namespace System.ServiceModel.Channels
return context.CanBuildInnerChannelFactory<TChannel> ();
}
#if !NET_2_1
#if !MOBILE
public virtual bool CanBuildChannelListener<TChannel> (
BindingContext context)
where TChannel : class, IChannel

View File

@@ -65,7 +65,7 @@ namespace System.ServiceModel.Channels
var f = mbe.CreateMessageEncoderFactory ();
var t = typeof (TChannel);
if (t == typeof (IRequestSessionChannel) ||
#if !NET_2_1
#if !MOBILE
t == typeof (IReplySessionChannel) ||
#endif
t == typeof (IInputSessionChannel) ||

View File

@@ -137,7 +137,7 @@ namespace System.ServiceModel.Channels
OperationContext ctx = OperationContext.Current;
// FIXME: support more fault code depending on the exception type.
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
// FIXME: set correct fault reason.
if (ctx != null && ctx.EndpointDispatcher.ChannelDispatcher.IncludeExceptionDetailInFaults) {
ExceptionDetail detail = new ExceptionDetail (error);

View File

@@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels
get { return source.MessageEncoder; }
}
#if NET_2_1
#if MOBILE
public override T GetProperty<T> ()
{
if (typeof (T) == typeof (IHttpCookieContainerManager))
@@ -126,6 +126,7 @@ namespace System.ServiceModel.Channels
}
web_request.Timeout = (int) timeout.TotalMilliseconds;
web_request.KeepAlive = httpbe.KeepAliveEnabled;
// There is no SOAP Action/To header when AddressingVersion is None.
if (message.Version.Envelope.Equals (EnvelopeVersion.Soap11) ||
@@ -189,7 +190,7 @@ namespace System.ServiceModel.Channels
suppressEntityBody = true;
}
#if !NET_2_1
#if !MOBILE
if (source.ClientCredentials != null) {
var cred = source.ClientCredentials;
if ((cred.ClientCertificate != null) && (cred.ClientCertificate.Certificate != null))
@@ -476,7 +477,7 @@ namespace System.ServiceModel.Channels
// FIXME: Do we need to use the timeout? If so, what happens when the timeout is reached.
// Is the current request cancelled and an exception thrown? If so we need to pass the
// exception to the Complete () method and allow the result to complete 'normally'.
#if NET_2_1
#if MOBILE
// neither Moonlight nor MonoTouch supports contexts (WaitOne default to false)
bool result = AsyncWaitHandle.WaitOne (Timeout);
#else

View File

@@ -32,7 +32,7 @@ using System.Net;
using System.Net.Security;
using System.Security.Authentication.ExtendedProtection;
using System.ServiceModel.Channels;
#if !NET_2_1
#if !MOBILE
using System.ServiceModel.Channels.Http;
#endif
using System.ServiceModel.Description;
@@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels
return typeof (TChannel) == typeof (IRequestChannel);
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
public override bool CanBuildChannelListener<TChannel> (
BindingContext context)
{
@@ -201,7 +201,7 @@ namespace System.ServiceModel.Channels
return new HttpChannelFactory<TChannel> (this, context);
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
internal static object ListenerBuildLock = new object ();
public override IChannelListener<TChannel> BuildChannelListener<TChannel> (
@@ -242,7 +242,7 @@ namespace System.ServiceModel.Channels
set { throw new NotImplementedException (); }
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
void IPolicyExportExtension.ExportPolicy (
MetadataExporter exporter,
PolicyConversionContext context)

View File

@@ -68,7 +68,7 @@ namespace System.ServiceModel.Channels
return base.BuildChannelFactory <TChannel> (context);
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO]
public override IChannelListener<TChannel>
BuildChannelListener<TChannel> (
@@ -83,7 +83,7 @@ namespace System.ServiceModel.Channels
return new HttpsTransportBindingElement (this);
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
public XmlElement GetTransportTokenAssertion ()
{
var doc = new XmlDocument ();

View File

@@ -33,7 +33,7 @@ namespace System.ServiceModel.Channels
[MonoTODO]
public sealed class LocalClientSecuritySettings
{
#if !NET_2_1
#if !MOBILE
bool cache_cookies = true;
int cookie_renewal = 60;
bool detect_replays = true;
@@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels
public TimeSpan ReplayWindow { get; set; }
public TimeSpan TimestampValidityDuration { get; set; }
#if !NET_2_1
#if !MOBILE
public bool CacheCookies {
get { return cache_cookies; }
set { cache_cookies = value; }

View File

@@ -89,7 +89,7 @@ namespace System.ServiceModel.Channels
}
}
#if !NET_2_1
#if !MOBILE
internal class XPathMessageBuffer : MessageBuffer
{
IXPathNavigable source;

View File

@@ -59,7 +59,7 @@ namespace System.ServiceModel.Channels
return context.GetInnerProperty<T> ();
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO]
protected virtual void OnImportPolicy (XmlElement assertion,
MessageVersion messageVersion,

View File

@@ -209,7 +209,7 @@ namespace System.ServiceModel.Channels
{
bool is_ref, must_understand, relay;
string actor;
#if NET_2_1
#if MOBILE
string body;
#else
// This is required to completely clone body xml that
@@ -238,7 +238,7 @@ namespace System.ServiceModel.Channels
local_name = reader.LocalName;
namespace_uri = reader.NamespaceURI;
#if NET_2_1
#if MOBILE
body = reader.ReadOuterXml ();
#else
body = new XmlDocument ();
@@ -250,7 +250,7 @@ namespace System.ServiceModel.Channels
public XmlReader CreateReader ()
{
#if NET_2_1
#if MOBILE
var reader = XmlReader.Create (new StringReader (body));
#else
var reader = new XmlNodeReader (body);

View File

@@ -327,7 +327,7 @@ namespace System.ServiceModel.Channels
return;
if (MessageVersion.Addressing.Equals (AddressingVersion.WSAddressing10))
Add (MessageHeader.CreateHeader (name, ns, EndpointAddress10.FromEndpointAddress (address)));
#if !NET_2_1
#if !MOBILE
else if (MessageVersion.Addressing.Equals (AddressingVersion.WSAddressingAugust2004))
Add (MessageHeader.CreateHeader (name, ns, EndpointAddressAugust2004.FromEndpointAddress (address)));
#endif

View File

@@ -98,7 +98,7 @@ namespace System.ServiceModel.Channels
}
}
#if !NET_2_1
#if !MOBILE
public SecurityMessageProperty Security {
get { return (SecurityMessageProperty) this ["Security"]; }
set { this ["Security"] = value; }

View File

@@ -69,7 +69,7 @@ namespace System.ServiceModel.Channels
throw new NotImplementedException ();
}
#if !NET_2_1
#if !MOBILE
[MonoTODO]
public override IChannelListener<TChannel> BuildChannelListener<TChannel> (BindingContext context)
{

View File

@@ -30,7 +30,7 @@ using System.Collections.ObjectModel;
using System.ServiceModel.Description;
using System.ServiceModel.Channels;
using System.ServiceModel.Security;
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
using System.ServiceModel.Channels.Security;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
@@ -46,7 +46,7 @@ namespace System.ServiceModel.Channels
{
MessageSecurityVersion = MessageSecurityVersion.Default;
endpoint = new SupportingTokenParameters ();
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy;
operation = new Dictionary<string,SupportingTokenParameters> ();
@@ -63,7 +63,7 @@ namespace System.ServiceModel.Channels
security_header_layout = other.security_header_layout;
msg_security_version = other.msg_security_version;
endpoint = other.endpoint.Clone ();
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
alg_suite = other.alg_suite;
key_entropy_mode = other.key_entropy_mode;
opt_endpoint = other.opt_endpoint.Clone ();
@@ -83,7 +83,7 @@ namespace System.ServiceModel.Channels
MessageSecurityVersion msg_security_version;
SupportingTokenParameters endpoint;
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
SecurityAlgorithmSuite alg_suite;
SecurityKeyEntropyMode key_entropy_mode;
SupportingTokenParameters opt_endpoint;
@@ -109,7 +109,7 @@ namespace System.ServiceModel.Channels
get { return endpoint; }
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
public SecurityAlgorithmSuite DefaultAlgorithmSuite {
get { return alg_suite; }
set { alg_suite = value; }
@@ -140,7 +140,7 @@ namespace System.ServiceModel.Channels
[MonoTODO ("Implement for TransportSecurityBindingElement")]
public override bool CanBuildChannelFactory<TChannel> (BindingContext context)
{
#if NET_2_1 || XAMMAC_4_5
#if MOBILE || XAMMAC_4_5
// not sure this should be like this, but there isn't Symmetric/Asymmetric elements in 2.1 anyways.
return context.CanBuildInnerChannelFactory<TChannel> ();
#else
@@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels
protected abstract IChannelFactory<TChannel>
BuildChannelFactoryCore<TChannel> (BindingContext context);
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO ("Implement for TransportSecurityBindingElement")]
public override bool CanBuildChannelListener<TChannel> (BindingContext context)
{
@@ -272,7 +272,7 @@ namespace System.ServiceModel.Channels
#endif
#region Factory methods
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
public static SymmetricSecurityBindingElement
CreateAnonymousForCertificateBindingElement ()
{
@@ -548,7 +548,7 @@ namespace System.ServiceModel.Channels
SecurityBindingElement bootstrapSecurity, bool requireCancellation,
ChannelProtectionRequirements bootstrapProtectionRequirements)
{
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
SymmetricSecurityBindingElement be =
new SymmetricSecurityBindingElement ();
be.ProtectionTokenParameters =
@@ -565,14 +565,14 @@ namespace System.ServiceModel.Channels
CreateUserNameOverTransportBindingElement ()
{
var be = new TransportSecurityBindingElement ();
#if !NET_2_1 && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead.
#if !MOBILE && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead.
be.EndpointSupportingTokenParameters.SignedEncrypted.Add (new UserNameSecurityTokenParameters ());
#endif
return be;
}
#endregion
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
// It seems almost internal, hardcoded like this (I tried
// custom parameters that sets IssuedTokenSecurityTokenParameters
// like below ones, but that didn't trigger this method).

View File

@@ -105,7 +105,7 @@ namespace System.ServiceModel.Channels
return base.BuildChannelFactory<TChannel> (context);
}
#if !NET_2_1
#if !MOBILE
public override IChannelListener<TChannel> BuildChannelListener<TChannel> (
BindingContext context)
{
@@ -143,7 +143,7 @@ namespace System.ServiceModel.Channels
return new TextMessageEncoderFactory (this);
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO]
protected override void OnImportPolicy (XmlElement assertion,
MessageVersion messageVersion,

View File

@@ -81,7 +81,7 @@ namespace System.ServiceModel.Channels
q.MaxStringContentLength = (int) MaxReceivedMessageSize;
return (T) (object) q;
}
#if !NET_2_1
#if !MOBILE
if (typeof (T) == typeof (ChannelProtectionRequirements))
// blank one, basically it should not be used
// for any secure channels (
@@ -92,7 +92,7 @@ namespace System.ServiceModel.Channels
return context.GetInnerProperty<T> ();
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
internal static XmlElement CreateTransportBinding (XmlElement transportToken)
{
var doc = new XmlDocument ();

View File

@@ -36,7 +36,7 @@ using System.ServiceModel.Security.Tokens;
namespace System.ServiceModel.Channels
{
public sealed class TransportSecurityBindingElement
#if NET_2_1
#if MOBILE
: SecurityBindingElement
#else
: SecurityBindingElement, IPolicyExportExtension
@@ -65,7 +65,7 @@ namespace System.ServiceModel.Channels
throw new NotImplementedException ();
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO]
protected override IChannelListener<TChannel>
BuildChannelListenerCore<TChannel> (