Imported Upstream version 4.6.0.182

Former-commit-id: 439c182e520038bf50777ca2fe684f216ae28552
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-09-01 10:46:18 +00:00
parent c911219690
commit 804b15604f
118 changed files with 1007 additions and 891 deletions

View File

@ -35,8 +35,8 @@ namespace System.ServiceModel
public class ActionNotSupportedException : CommunicationException
{
public ActionNotSupportedException () : base () {}
public ActionNotSupportedException (string msg) : base (msg) {}
public ActionNotSupportedException (string msg, Exception inner) : base (msg, inner) {}
public ActionNotSupportedException (string message) : base (message) {}
public ActionNotSupportedException (string message, Exception innerException) : base (message, innerException) {}
protected ActionNotSupportedException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}

View File

@ -85,9 +85,9 @@ namespace System.ServiceModel
get { return Endpoint.Binding.OpenTimeout; }
}
protected virtual void ApplyConfiguration (string endpointConfig)
protected virtual void ApplyConfiguration (string configurationName)
{
if (endpointConfig == null)
if (configurationName == null)
return;
#if NET_2_1 || XAMMAC_4_5
@ -96,22 +96,22 @@ namespace System.ServiceModel
var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig"));
SilverlightClientConfigLoader.ServiceEndpointConfiguration se = null;
if (endpointConfig == "*")
if (configurationName == "*")
se = cfg.GetServiceEndpointConfiguration (Endpoint.Contract.Name);
if (se == null)
se = cfg.GetServiceEndpointConfiguration (endpointConfig);
se = cfg.GetServiceEndpointConfiguration (configurationName);
if (se.Binding != null && Endpoint.Binding == null)
Endpoint.Binding = se.Binding;
else // ignore it
Console.WriteLine ("WARNING: Configured binding not found in configuration {0}", endpointConfig);
Console.WriteLine ("WARNING: Configured binding not found in configuration {0}", configurationName);
if (se.Address != null && Endpoint.Address == null)
Endpoint.Address = se.Address;
else // ignore it
Console.WriteLine ("WARNING: Configured endpoint address not found in configuration {0}", endpointConfig);
Console.WriteLine ("WARNING: Configured endpoint address not found in configuration {0}", configurationName);
} catch (Exception) {
// ignore it.
Console.WriteLine ("WARNING: failed to load endpoint configuration for {0}", endpointConfig);
Console.WriteLine ("WARNING: failed to load endpoint configuration for {0}", configurationName);
}
#else
@ -120,7 +120,7 @@ namespace System.ServiceModel
ChannelEndpointElement endpoint = null;
foreach (ChannelEndpointElement el in client.Endpoints) {
if (el.Contract == contractName && (endpointConfig == el.Name || endpointConfig == "*")) {
if (el.Contract == contractName && (configurationName == el.Name || configurationName == "*")) {
if (endpoint != null)
throw new InvalidOperationException (String.Format ("More then one endpoint matching contract {0} was found.", contractName));
endpoint = el;
@ -128,7 +128,7 @@ namespace System.ServiceModel
}
if (endpoint == null)
throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", endpointConfig, client.Endpoints.Count));
throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", configurationName, client.Endpoints.Count));
var binding = String.IsNullOrEmpty (endpoint.Binding) ? null : ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
var contractType = ConfigUtil.GetTypeFromConfigString (endpoint.Contract, NamedConfigCategory.Contract);
@ -298,23 +298,23 @@ namespace System.ServiceModel
}
protected void InitializeEndpoint (
string endpointConfigurationName,
string configurationName,
EndpointAddress remoteAddress)
{
InitializeEndpoint (CreateDescription ());
if (remoteAddress != null)
service_endpoint.Address = remoteAddress;
ApplyConfiguration (endpointConfigurationName);
ApplyConfiguration (configurationName);
}
protected void InitializeEndpoint (Binding binding,
EndpointAddress remoteAddress)
EndpointAddress address)
{
InitializeEndpoint (CreateDescription ());
if (binding != null)
service_endpoint.Binding = binding;
if (remoteAddress != null)
service_endpoint.Address = remoteAddress;
if (address != null)
service_endpoint.Address = address;
}
protected void InitializeEndpoint (ServiceEndpoint endpoint)

View File

@ -46,12 +46,12 @@ namespace System.ServiceModel
{
}
protected ChannelFactory (Type type)
protected ChannelFactory (Type channelType)
{
if (type == null)
throw new ArgumentNullException ("type");
if (!type.IsInterface)
throw new InvalidOperationException ("The type argument to the generic ChannelFactory constructor must be an interface type.");
if (channelType == null)
throw new ArgumentNullException ("channelType");
if (!channelType.IsInterface)
throw new InvalidOperationException ("The channelType argument to the generic ChannelFactory constructor must be an interface type.");
InitializeEndpoint (CreateDescription ());
}

View File

@ -34,8 +34,8 @@ namespace System.ServiceModel {
public class CommunicationException : SystemException
{
public CommunicationException () : base () {}
public CommunicationException (string msg) : base (msg) {}
public CommunicationException (string msg, Exception inner) : base (msg, inner) {}
public CommunicationException (string message) : base (message) {}
public CommunicationException (string message, Exception innerException) : base (message, innerException) {}
protected CommunicationException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class CommunicationObjectAbortedException : CommunicationException
{
public CommunicationObjectAbortedException () : base () {}
public CommunicationObjectAbortedException (string msg) : base (msg) {}
public CommunicationObjectAbortedException (string msg, Exception inner)
: base (msg, inner) {}
public CommunicationObjectAbortedException (string message) : base (message) {}
public CommunicationObjectAbortedException (string message, Exception innerException)
: base (message, innerException) {}
protected CommunicationObjectAbortedException (SerializationInfo info,
StreamingContext context)
: base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class CommunicationObjectFaultedException : CommunicationException
{
public CommunicationObjectFaultedException () : base () {}
public CommunicationObjectFaultedException (string msg) : base (msg) {}
public CommunicationObjectFaultedException (string msg, Exception inner)
: base (msg, inner) {}
public CommunicationObjectFaultedException (string message) : base (message) {}
public CommunicationObjectFaultedException (string message, Exception innerException)
: base (message, innerException) {}
protected CommunicationObjectFaultedException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
}

View File

@ -45,12 +45,12 @@ namespace System.ServiceModel
Initialize (identity);
}
public DnsEndpointIdentity (string dns)
: this (Claim.CreateDnsClaim (dns))
public DnsEndpointIdentity (string dnsName)
: this (Claim.CreateDnsClaim (dnsName))
{
}
#else
public DnsEndpointIdentity (string dns)
public DnsEndpointIdentity (string dnsName)
{
throw new NotImplementedException ();
}

View File

@ -34,71 +34,71 @@ namespace System.ServiceModel
{
public class DuplexClientBase<TChannel> : ClientBase<TChannel> where TChannel : class
{
protected DuplexClientBase (object instance)
: this (new InstanceContext (instance), (Binding) null, null)
protected DuplexClientBase (object callbackInstance)
: this (new InstanceContext (callbackInstance), (Binding) null, null)
{
}
protected DuplexClientBase (object instance,
Binding binding, EndpointAddress address)
: this (new InstanceContext (instance), binding, address)
protected DuplexClientBase (object callbackInstance,
Binding binding, EndpointAddress remoteAddress)
: this (new InstanceContext (callbackInstance), binding, remoteAddress)
{
}
protected DuplexClientBase (object instance,
string configurationName)
: this (new InstanceContext (instance), configurationName)
protected DuplexClientBase (object callbackInstance,
string endpointConfigurationName)
: this (new InstanceContext (callbackInstance), endpointConfigurationName)
{
}
protected DuplexClientBase (object instance,
string bindingConfigurationName, EndpointAddress address)
: this (new InstanceContext (instance), bindingConfigurationName, address)
protected DuplexClientBase (object callbackInstance,
string bindingConfigurationName, EndpointAddress remoteAddress)
: this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
{
}
protected DuplexClientBase (object instance,
protected DuplexClientBase (object callbackInstance,
string endpointConfigurationName, string remoteAddress)
: this (new InstanceContext (instance), endpointConfigurationName, remoteAddress)
: this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
{
}
protected DuplexClientBase (InstanceContext instance)
: base (instance)
protected DuplexClientBase (InstanceContext callbackInstance)
: base (callbackInstance)
{
}
protected DuplexClientBase (InstanceContext instance,
Binding binding, EndpointAddress address)
: base (instance, binding, address)
protected DuplexClientBase (InstanceContext callbackInstance,
Binding binding, EndpointAddress remoteAddress)
: base (callbackInstance, binding, remoteAddress)
{
}
protected DuplexClientBase (InstanceContext instance,
string configurationName)
: base (instance, configurationName)
protected DuplexClientBase (InstanceContext callbackInstance,
string endpointConfigurationName)
: base (callbackInstance, endpointConfigurationName)
{
}
protected DuplexClientBase (InstanceContext instance,
protected DuplexClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, string remoteAddress)
: base (instance, endpointConfigurationName, remoteAddress)
: base (callbackInstance, endpointConfigurationName, remoteAddress)
{
}
protected DuplexClientBase (InstanceContext instance,
string configurationName, EndpointAddress address)
: base (instance, configurationName, address)
protected DuplexClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, EndpointAddress address)
: base (callbackInstance, endpointConfigurationName, address)
{
}
protected DuplexClientBase (object instance, ServiceEndpoint endpoint)
: this (new InstanceContext (instance), endpoint)
protected DuplexClientBase (object callbackInstance, ServiceEndpoint endpoint)
: this (new InstanceContext (callbackInstance), endpoint)
{
}
protected DuplexClientBase (InstanceContext instance, ServiceEndpoint endpoint)
: base (instance, endpoint)
protected DuplexClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
: base (callbackInstance, endpoint)
{
}

View File

@ -70,11 +70,11 @@ namespace System.ServiceModel
{
}
public EndpointAddress (Uri uri, params AddressHeader [] headers)
: this (uri, null, new AddressHeaderCollection (headers), null, null) {}
public EndpointAddress (Uri uri, params AddressHeader [] addressHeaders)
: this (uri, null, new AddressHeaderCollection (addressHeaders), null, null) {}
public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] headers)
: this (uri, identity, new AddressHeaderCollection (headers), null, null) {}
public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] addressHeaders)
: this (uri, identity, new AddressHeaderCollection (addressHeaders), null, null) {}
public EndpointAddress (Uri uri, EndpointIdentity identity, AddressHeaderCollection headers)
: this (uri, identity, headers, null, null) {}

View File

@ -34,8 +34,8 @@ namespace System.ServiceModel {
public class EndpointNotFoundException : CommunicationException
{
public EndpointNotFoundException () : base () {}
public EndpointNotFoundException (string msg) : base (msg) {}
public EndpointNotFoundException (string msg, Exception inner) : base (msg, inner) {}
public EndpointNotFoundException (string message) : base (message) {}
public EndpointNotFoundException (string message, Exception innerException) : base (message, innerException) {}
protected EndpointNotFoundException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}

View File

@ -42,16 +42,16 @@ namespace System.ServiceModel
{
}
public FaultCode (string name, FaultCode subcode)
: this (name, String.Empty, subcode)
public FaultCode (string name, FaultCode subCode)
: this (name, String.Empty, subCode)
{
}
public FaultCode (string name, string ns, FaultCode subcode)
public FaultCode (string name, string ns, FaultCode subCode)
{
this.name = name;
this.ns = ns;
this.subcode = subcode;
this.subcode = subCode;
}
public bool IsPredefinedFault {
@ -78,9 +78,9 @@ namespace System.ServiceModel
get { return subcode; }
}
public static FaultCode CreateReceiverFaultCode (FaultCode subcode)
public static FaultCode CreateReceiverFaultCode (FaultCode subCode)
{
return new FaultCode ("Receiver", subcode);
return new FaultCode ("Receiver", subCode);
}
public static FaultCode CreateReceiverFaultCode (string name, string ns)
@ -88,9 +88,9 @@ namespace System.ServiceModel
return CreateReceiverFaultCode (new FaultCode (name, ns));
}
public static FaultCode CreateSenderFaultCode (FaultCode subcode)
public static FaultCode CreateSenderFaultCode (FaultCode subCode)
{
return new FaultCode ("Sender", subcode);
return new FaultCode ("Sender", subCode);
}
public static FaultCode CreateSenderFaultCode (string name, string ns)

View File

@ -100,7 +100,7 @@ namespace System.ServiceModel
}
[MonoTODO]
public static FaultException CreateFault (MessageFault fault, params Type [] details)
public static FaultException CreateFault (MessageFault messageFault, params Type [] faultDetailTypes)
{
throw new NotImplementedException ();
}

View File

@ -34,8 +34,8 @@ namespace System.ServiceModel {
public class InvalidMessageContractException : SystemException
{
public InvalidMessageContractException () : base () {}
public InvalidMessageContractException (string msg) : base (msg) {}
public InvalidMessageContractException (string msg, Exception inner) : base (msg, inner) {}
public InvalidMessageContractException (string message) : base (message) {}
public InvalidMessageContractException (string message, Exception innerException) : base (message, innerException) {}
protected InvalidMessageContractException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}

View File

@ -35,8 +35,8 @@ namespace System.ServiceModel {
public class MessageHeaderException : ProtocolException
{
public MessageHeaderException () : this ("Message header exception") {}
public MessageHeaderException (string msg) : this (msg, null) {}
public MessageHeaderException (string msg, Exception inner) : base (msg, inner) {}
public MessageHeaderException (string message) : this (message, null) {}
public MessageHeaderException (string message, Exception innerException) : base (message, innerException) {}
protected MessageHeaderException (SerializationInfo info, StreamingContext context) :
base (info, context)
{

View File

@ -53,10 +53,10 @@ namespace System.ServiceModel
{
}
public MessageHeader (T content, bool must_understand, string actor, bool relay)
public MessageHeader (T content, bool mustUnderstand, string actor, bool relay)
{
this.content = content;
this.must_understand = must_understand;
this.must_understand = mustUnderstand;
this.actor = actor;
this.relay = relay;
}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class ProtocolException : CommunicationException
{
public ProtocolException () : base () {}
public ProtocolException (string msg) : base (msg) {}
public ProtocolException (string msg, Exception inner)
: base (msg, inner) {}
public ProtocolException (string message) : base (message) {}
public ProtocolException (string message, Exception innerException)
: base (message, innerException) {}
protected ProtocolException (SerializationInfo info,
StreamingContext context)
: base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class QuotaExceededException : SystemException
{
public QuotaExceededException () : base () {}
public QuotaExceededException (string msg) : base (msg) {}
public QuotaExceededException (string msg, Exception inner)
: base (msg, inner) {}
public QuotaExceededException (string message) : base (message) {}
public QuotaExceededException (string message, Exception innerException)
: base (message, innerException) {}
protected QuotaExceededException (SerializationInfo info,
StreamingContext context)
: base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class ServerTooBusyException : CommunicationException
{
public ServerTooBusyException () : base () {}
public ServerTooBusyException (string msg) : base (msg) {}
public ServerTooBusyException (string msg, Exception inner)
: base (msg, inner) {}
public ServerTooBusyException (string message) : base (message) {}
public ServerTooBusyException (string message, Exception innerException)
: base (message, innerException) {}
protected ServerTooBusyException (SerializationInfo info,
StreamingContext context)
: base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class ServiceActivationException : CommunicationException
{
public ServiceActivationException () : base () {}
public ServiceActivationException (string msg) : base (msg) {}
public ServiceActivationException (string msg, Exception inner)
: base (msg, inner) {}
public ServiceActivationException (string message) : base (message) {}
public ServiceActivationException (string message, Exception innerException)
: base (message, innerException) {}
protected ServiceActivationException (SerializationInfo info,
StreamingContext context)
: base (info, context) {}

View File

@ -45,12 +45,12 @@ namespace System.ServiceModel
Initialize (identity);
}
public SpnEndpointIdentity (string spn)
: this (Claim.CreateSpnClaim (spn))
public SpnEndpointIdentity (string spnName)
: this (Claim.CreateSpnClaim (spnName))
{
}
#else
public SpnEndpointIdentity (string spn)
public SpnEndpointIdentity (string spnName)
{
throw new NotImplementedException ();
}

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