Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

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

View File

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

View File

@ -299,11 +299,11 @@ namespace System.ServiceModel
protected void InitializeEndpoint (
string configurationName,
EndpointAddress remoteAddress)
EndpointAddress address)
{
InitializeEndpoint (CreateDescription ());
if (remoteAddress != null)
service_endpoint.Address = remoteAddress;
if (address != null)
service_endpoint.Address = address;
ApplyConfiguration (configurationName);
}

View File

@ -125,14 +125,14 @@ namespace System.ServiceModel
return ch;
}
public static TChannel CreateChannel (Binding binding, EndpointAddress address)
public static TChannel CreateChannel (Binding binding, EndpointAddress endpointAddress)
{
return CreateChannelCore (new ChannelFactory<TChannel> (binding, address), f => f.CreateChannel ());
return CreateChannelCore (new ChannelFactory<TChannel> (binding, endpointAddress), f => f.CreateChannel ());
}
public static TChannel CreateChannel (Binding binding, EndpointAddress address, Uri via)
public static TChannel CreateChannel (Binding binding, EndpointAddress endpointAddress, Uri via)
{
return CreateChannelCore (new ChannelFactory<TChannel> (binding), f => f.CreateChannel (address, via));
return CreateChannelCore (new ChannelFactory<TChannel> (binding), f => f.CreateChannel (endpointAddress, via));
}
public virtual TChannel CreateChannel (EndpointAddress address, Uri via)

View File

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

View File

@ -75,58 +75,58 @@ namespace System.ServiceModel
{
}
protected ClientBase (InstanceContext instance)
: this (instance, "*")
protected ClientBase (InstanceContext callbackInstance)
: this (callbackInstance, "*")
{
}
protected ClientBase (InstanceContext instance, string endpointConfigurationName)
protected ClientBase (InstanceContext callbackInstance, string endpointConfigurationName)
{
if (instance == null)
if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (endpointConfigurationName == null)
throw new ArgumentNullException ("endpointConfigurationName");
Initialize (instance, endpointConfigurationName, null);
Initialize (callbackInstance, endpointConfigurationName, null);
}
protected ClientBase (InstanceContext instance,
protected ClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, EndpointAddress remoteAddress)
{
if (instance == null)
if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (endpointConfigurationName == null)
throw new ArgumentNullException ("endpointConfigurationName");
if (remoteAddress == null)
throw new ArgumentNullException ("remoteAddress");
Initialize (instance, endpointConfigurationName, remoteAddress);
Initialize (callbackInstance, endpointConfigurationName, remoteAddress);
}
protected ClientBase (InstanceContext instance,
protected ClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, string remoteAddress)
{
if (instance == null)
if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (remoteAddress == null)
throw new ArgumentNullException ("endpointAddress");
if (endpointConfigurationName == null)
throw new ArgumentNullException ("endpointConfigurationName");
Initialize (instance, endpointConfigurationName, new EndpointAddress (remoteAddress));
Initialize (callbackInstance, endpointConfigurationName, new EndpointAddress (remoteAddress));
}
protected ClientBase (InstanceContext instance,
protected ClientBase (InstanceContext callbackInstance,
Binding binding, EndpointAddress remoteAddress)
{
if (instance == null)
if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (binding == null)
throw new ArgumentNullException ("binding");
if (remoteAddress == null)
throw new ArgumentNullException ("remoteAddress");
Initialize (instance, binding, remoteAddress);
Initialize (callbackInstance, binding, remoteAddress);
}
protected ClientBase (ServiceEndpoint endpoint)
@ -134,8 +134,8 @@ namespace System.ServiceModel
{
}
protected ClientBase (InstanceContext instance, ServiceEndpoint endpoint)
: this (instance, new ChannelFactory<TChannel> (endpoint))
protected ClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
: this (callbackInstance, new ChannelFactory<TChannel> (endpoint))
{
}

View File

@ -1,4 +1,4 @@
//
//
// ClientCredentialsSecurityTokenManager.cs
//
// Author:
@ -45,11 +45,11 @@ namespace System.ServiceModel
{
ClientCredentials credentials;
public ClientCredentialsSecurityTokenManager (ClientCredentials credentials)
public ClientCredentialsSecurityTokenManager (ClientCredentials clientCredentials)
{
if (credentials == null)
throw new ArgumentNullException ("credentials");
this.credentials = credentials;
if (clientCredentials == null)
throw new ArgumentNullException ("clientCredentials");
this.credentials = clientCredentials;
}
public ClientCredentials ClientCredentials {
@ -58,25 +58,25 @@ namespace System.ServiceModel
[MonoTODO]
public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator (
SecurityTokenRequirement requirement,
SecurityTokenRequirement tokenRequirement,
out SecurityTokenResolver outOfBandTokenResolver)
{
outOfBandTokenResolver = null;
if (requirement == null)
throw new ArgumentNullException ("requirement");
if (requirement.TokenType == SecurityTokenTypes.UserName) {
if (tokenRequirement == null)
throw new ArgumentNullException ("tokenRequirement");
if (tokenRequirement.TokenType == SecurityTokenTypes.UserName) {
// unsupported
}
else if (requirement.TokenType == SecurityTokenTypes.Rsa)
else if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa)
return new RsaSecurityTokenAuthenticator ();
else if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
return CreateX509Authenticator (requirement);
else if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
return new SspiClientSecurityTokenAuthenticator (this, requirement);
else if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
return CreateX509Authenticator (tokenRequirement);
else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
return new SspiClientSecurityTokenAuthenticator (this, tokenRequirement);
else
throw new NotImplementedException ("Security token type " + requirement.TokenType);
throw new NotImplementedException ("Security token type " + tokenRequirement.TokenType);
throw new NotSupportedException (String.Format ("Security token requirement '{0}' is not supported to create SecurityTokenAuthenticator.", requirement));
throw new NotSupportedException (String.Format ("Security token requirement '{0}' is not supported to create SecurityTokenAuthenticator.", tokenRequirement));
}
@ -102,40 +102,40 @@ namespace System.ServiceModel
#region CreateSecurityTokenProvider()
[MonoTODO]
public override SecurityTokenProvider CreateSecurityTokenProvider (SecurityTokenRequirement requirement)
public override SecurityTokenProvider CreateSecurityTokenProvider (SecurityTokenRequirement tokenRequirement)
{
if (IsIssuedSecurityTokenRequirement (requirement))
return CreateIssuedTokenProvider (requirement);
if (IsIssuedSecurityTokenRequirement (tokenRequirement))
return CreateIssuedTokenProvider (tokenRequirement);
bool isInitiator;
// huh, they are not constants but properties.
if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
return CreateX509SecurityTokenProvider (requirement);
else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation)
return CreateSecureConversationProvider (requirement);
else if (requirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego) {
if (requirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
return CreateSslnegoProvider (requirement);
} else if (requirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego) {
if (requirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
return CreateSslnegoProvider (requirement);
} else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecurityContext) {
if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
return CreateX509SecurityTokenProvider (tokenRequirement);
else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation)
return CreateSecureConversationProvider (tokenRequirement);
else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego) {
if (tokenRequirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
return CreateSslnegoProvider (tokenRequirement);
} else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego) {
if (tokenRequirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
return CreateSslnegoProvider (tokenRequirement);
} else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecurityContext) {
// FIXME: implement
} else if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego) {
return CreateSpnegoProvider (requirement);
} else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SspiCredential) {
} else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego) {
return CreateSpnegoProvider (tokenRequirement);
} else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SspiCredential) {
// FIXME: implement
} else if (requirement.TokenType == SecurityTokenTypes.Rsa) {
} else if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa) {
// FIXME: implement
} else if (requirement.TokenType == SecurityTokenTypes.Saml) {
} else if (tokenRequirement.TokenType == SecurityTokenTypes.Saml) {
// FIXME: implement
} else if (requirement.TokenType == SecurityTokenTypes.UserName)
return CreateUserNameProvider (requirement);
else if (requirement.TokenType == SecurityTokenTypes.Kerberos) {
return CreateKerberosProvider (requirement);
} else if (tokenRequirement.TokenType == SecurityTokenTypes.UserName)
return CreateUserNameProvider (tokenRequirement);
else if (tokenRequirement.TokenType == SecurityTokenTypes.Kerberos) {
return CreateKerberosProvider (tokenRequirement);
}
throw new NotSupportedException (String.Format ("Token type '{0}' is not supported", requirement.TokenType));
throw new NotSupportedException (String.Format ("Token type '{0}' is not supported", tokenRequirement.TokenType));
}
UserNameSecurityTokenProvider CreateUserNameProvider (

View File

@ -93,47 +93,47 @@ namespace System.ServiceModel
callback_instance_type = callbackInstanceType;
}
public DuplexChannelFactory (object callbackInstance)
: this (new InstanceContext (callbackInstance))
public DuplexChannelFactory (object callbackObject)
: this (new InstanceContext (callbackObject))
{
}
public DuplexChannelFactory (object callbackInstance,
public DuplexChannelFactory (object callbackObject,
string endpointConfigurationName)
: this (new InstanceContext (callbackInstance), endpointConfigurationName)
: this (new InstanceContext (callbackObject), endpointConfigurationName)
{
}
public DuplexChannelFactory (object callbackInstance,
public DuplexChannelFactory (object callbackObject,
string endpointConfigurationName,
EndpointAddress remoteAddress)
: this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
: this (new InstanceContext (callbackObject), endpointConfigurationName, remoteAddress)
{
}
public DuplexChannelFactory (object callbackInstance,
public DuplexChannelFactory (object callbackObject,
ServiceEndpoint endpoint)
: this (new InstanceContext (callbackInstance), endpoint)
: this (new InstanceContext (callbackObject), endpoint)
{
}
public DuplexChannelFactory (object callbackInstance,
public DuplexChannelFactory (object callbackObject,
Binding binding)
: this (new InstanceContext (callbackInstance), binding)
: this (new InstanceContext (callbackObject), binding)
{
}
public DuplexChannelFactory (object callbackInstance,
public DuplexChannelFactory (object callbackObject,
Binding binding,
string remoteAddress)
: this (callbackInstance, binding, new EndpointAddress (remoteAddress))
: this (callbackObject, binding, new EndpointAddress (remoteAddress))
{
}
public DuplexChannelFactory (object callbackInstance,
public DuplexChannelFactory (object callbackObject,
Binding binding,
EndpointAddress remoteAddress)
: this (new InstanceContext (callbackInstance), binding, remoteAddress)
: this (new InstanceContext (callbackObject), binding, remoteAddress)
{
}

View File

@ -52,8 +52,8 @@ namespace System.ServiceModel
}
protected DuplexClientBase (object callbackInstance,
string bindingConfigurationName, EndpointAddress remoteAddress)
: this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
string endpointConfigurationName, EndpointAddress remoteAddress)
: this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
{
}
@ -87,8 +87,8 @@ namespace System.ServiceModel
}
protected DuplexClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, EndpointAddress address)
: base (callbackInstance, endpointConfigurationName, address)
string endpointConfigurationName, EndpointAddress remoteAddress)
: base (callbackInstance, endpointConfigurationName, remoteAddress)
{
}

View File

@ -406,19 +406,19 @@ namespace System.ServiceModel
public void WriteTo (
AddressingVersion addressingVersion,
XmlDictionaryWriter writer,
XmlDictionaryString localname,
XmlDictionaryString localName,
XmlDictionaryString ns)
{
writer.WriteStartElement (localname, ns);
writer.WriteStartElement (localName, ns);
WriteContentsTo (addressingVersion, writer);
writer.WriteEndElement ();
}
public void WriteTo (
AddressingVersion addressingVersion,
XmlWriter writer, string localname, string ns)
XmlWriter writer, string localName, string ns)
{
writer.WriteStartElement (localname, ns);
writer.WriteStartElement (localName, ns);
WriteContentsTo (addressingVersion, writer);
writer.WriteEndElement ();
}

View File

@ -110,9 +110,9 @@ namespace System.ServiceModel
return new X509CertificateEndpointIdentity (primaryCertificate, supportingCertificates);
}
public override bool Equals (object other)
public override bool Equals (object obj)
{
EndpointIdentity e = other as EndpointIdentity;
EndpointIdentity e = obj as EndpointIdentity;
return e != null && comparer.Equals (claim, e.claim);
}
@ -126,19 +126,19 @@ namespace System.ServiceModel
return String.Concat ("identity(", claim, ")");
}
protected void Initialize (Claim claim)
protected void Initialize (Claim identityClaim)
{
Initialize (claim, Claim.DefaultComparer);
Initialize (identityClaim, Claim.DefaultComparer);
}
protected void Initialize (Claim claim, IEqualityComparer<Claim> comparer)
protected void Initialize (Claim identityClaim, IEqualityComparer<Claim> claimComparer)
{
if (claim == null)
throw new ArgumentNullException ("claim");
if (comparer == null)
throw new ArgumentNullException ("comparer");
this.claim = claim;
this.comparer = comparer;
if (identityClaim == null)
throw new ArgumentNullException ("identityClaim");
if (claimComparer == null)
throw new ArgumentNullException ("claimComparer");
this.claim = identityClaim;
this.comparer = claimComparer;
}
}
}

View File

@ -44,13 +44,13 @@ namespace System.ServiceModel
{
}
public FaultException (string msg)
: this (new FaultReason (msg))
public FaultException (string reason)
: this (new FaultReason (reason))
{
}
public FaultException (string msg, FaultCode code)
: this (new FaultReason (msg), code)
public FaultException (string reason, FaultCode code)
: this (new FaultReason (reason), code)
{
}

View File

@ -36,9 +36,9 @@ namespace System.ServiceModel
public class MsmqException : ExternalException
{
public MsmqException () : base () {}
public MsmqException (string msg) : base (msg) {}
public MsmqException (string msg, int win32ErrorCode) : base (msg, win32ErrorCode) {}
public MsmqException (string msg, Exception inner) : base (msg, inner) {}
public MsmqException (string message) : base (message) {}
public MsmqException (string message, int error) : base (message, error) {}
public MsmqException (string message, Exception inner) : base (message, inner) {}
protected MsmqException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}

View File

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

View File

@ -1,4 +1,4 @@
//
//
// OptionalReliableSession.cs
//
// Author:
@ -42,11 +42,11 @@ namespace System.ServiceModel
{
}
public OptionalReliableSession (ReliableSessionBindingElement binding)
: base (binding)
public OptionalReliableSession (ReliableSessionBindingElement reliableSessionBindingElement)
: base (reliableSessionBindingElement)
{
if (binding == null)
throw new ArgumentNullException ("binding");
if (reliableSessionBindingElement == null)
throw new ArgumentNullException ("reliableSessionBindingElement");
}
public bool Enabled {

View File

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

View File

@ -1,4 +1,4 @@
//
//
// ReliableSession.cs
//
// Author:
@ -39,12 +39,12 @@ namespace System.ServiceModel
{
}
public ReliableSession (ReliableSessionBindingElement binding)
public ReliableSession (ReliableSessionBindingElement reliableSessionBindingElement)
{
if (binding == null)
throw new ArgumentNullException ("binding");
InactivityTimeout = binding.InactivityTimeout;
Ordered = binding.Ordered;
if (reliableSessionBindingElement == null)
throw new ArgumentNullException ("reliableSessionBindingElement");
InactivityTimeout = reliableSessionBindingElement.InactivityTimeout;
Ordered = reliableSessionBindingElement.Ordered;
}
public TimeSpan InactivityTimeout { get; set; }

View File

@ -49,11 +49,11 @@ namespace System.ServiceModel
throw new NotImplementedException ();
}
public RsaEndpointIdentity (X509Certificate2 cert)
public RsaEndpointIdentity (X509Certificate2 certificate)
{
if (cert == null)
throw new ArgumentNullException ("cert");
rsa = (RSA) cert.PublicKey.Key;
if (certificate == null)
throw new ArgumentNullException ("certificate");
rsa = (RSA) certificate.PublicKey.Key;
}
}
}

View File

@ -33,24 +33,24 @@ namespace System.ServiceModel
{
public class ServiceAuthorizationManager
{
public virtual bool CheckAccess (OperationContext context)
public virtual bool CheckAccess (OperationContext operationContext)
{
return CheckAccessCore (context);
return CheckAccessCore (operationContext);
}
public virtual bool CheckAccess (OperationContext context, ref Message message)
public virtual bool CheckAccess (OperationContext operationContext, ref Message message)
{
return CheckAccessCore (context);
return CheckAccessCore (operationContext);
}
[MonoTODO]
protected virtual bool CheckAccessCore (OperationContext context)
protected virtual bool CheckAccessCore (OperationContext operationContext)
{
return false;
}
[MonoTODO]
protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies (OperationContext context)
protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies (OperationContext operationContext)
{
throw new NotImplementedException ();
}

View File

@ -45,12 +45,12 @@ namespace System.ServiceModel
{
}
public ServiceHost (object serviceInstance,
public ServiceHost (object singletonInstance,
params Uri [] baseAddresses)
{
if (serviceInstance == null)
throw new ArgumentNullException ("serviceInstance");
InitializeDescription (serviceInstance,
if (singletonInstance == null)
throw new ArgumentNullException ("singletonInstance");
InitializeDescription (singletonInstance,
new UriSchemeKeyedCollection (baseAddresses));
}
@ -165,10 +165,10 @@ namespace System.ServiceModel
InitializeDescription (baseAddresses);
}
protected void InitializeDescription (object serviceInstance, UriSchemeKeyedCollection baseAddresses)
protected void InitializeDescription (object singletonInstance, UriSchemeKeyedCollection baseAddresses)
{
instance = serviceInstance;
InitializeDescription (serviceInstance.GetType (), baseAddresses);
instance = singletonInstance;
InitializeDescription (singletonInstance.GetType (), baseAddresses);
}
}
}

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