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

@ -45,9 +45,9 @@ namespace System.ServiceModel.Channels
return new DefaultAddressHeader (value);
}
public static AddressHeader CreateAddressHeader (object value, XmlObjectSerializer formatter)
public static AddressHeader CreateAddressHeader (object value, XmlObjectSerializer serializer)
{
return new DefaultAddressHeader (value, formatter);
return new DefaultAddressHeader (value, serializer);
}
public static AddressHeader CreateAddressHeader (string name, string ns, object value)
@ -56,11 +56,11 @@ namespace System.ServiceModel.Channels
}
public static AddressHeader CreateAddressHeader (string name, string ns, object value,
XmlObjectSerializer formatter)
XmlObjectSerializer serializer)
{
if (formatter == null)
throw new ArgumentNullException ("formatter");
return new DefaultAddressHeader (name, ns, value, formatter);
if (serializer == null)
throw new ArgumentNullException ("serializer");
return new DefaultAddressHeader (name, ns, value, serializer);
}
public override bool Equals (object obj)
@ -93,9 +93,9 @@ namespace System.ServiceModel.Channels
return GetValue<T> (new DataContractSerializer (typeof (T)));
}
public T GetValue<T> (XmlObjectSerializer formatter)
public T GetValue<T> (XmlObjectSerializer serializer)
{
return (T) formatter.ReadObject (GetAddressHeaderReader ());
return (T) serializer.ReadObject (GetAddressHeaderReader ());
}
protected abstract void OnWriteAddressHeaderContents (XmlDictionaryWriter writer);

View File

@ -47,8 +47,8 @@ namespace System.ServiceModel.Channels
{
}
public AddressHeaderCollection (IEnumerable<AddressHeader> headers)
: base (GetList (headers))
public AddressHeaderCollection (IEnumerable<AddressHeader> addressHeaders)
: base (GetList (addressHeaders))
{
}

View File

@ -44,17 +44,17 @@ namespace System.ServiceModel.Channels
BindingElementCollection elements; // for internal use
public BindingContext (CustomBinding binding,
BindingParameterCollection parms)
BindingParameterCollection parameters)
{
if (binding == null)
throw new ArgumentNullException ("binding");
if (parms == null)
throw new ArgumentNullException ("parms");
if (parameters == null)
throw new ArgumentNullException ("parameters");
this.binding = binding;
parameters = new BindingParameterCollection ();
foreach (var item in parms)
parameters.Add (item);
this.parameters = new BindingParameterCollection ();
foreach (var item in parameters)
this.parameters.Add (item);
this.elements = new BindingElementCollection ();
foreach (var item in binding.Elements)
this.elements.Add (item);

View File

@ -40,7 +40,7 @@ namespace System.ServiceModel.Channels
}
[MonoTODO]
protected BindingElement (BindingElement other)
protected BindingElement (BindingElement elementToBeCloned)
{
}

View File

@ -38,14 +38,14 @@ namespace System.ServiceModel.Channels
{
}
public BindingElementCollection (BindingElement [] bindings)
public BindingElementCollection (BindingElement [] elements)
{
AddRange (bindings);
AddRange (elements);
}
public BindingElementCollection (IEnumerable<BindingElement> bindings)
public BindingElementCollection (IEnumerable<BindingElement> elements)
{
foreach (BindingElement e in bindings)
foreach (BindingElement e in elements)
Add (e);
}

View File

@ -39,9 +39,9 @@ namespace System.ServiceModel.Channels
{
ChannelManagerBase manager;
protected ChannelBase (ChannelManagerBase manager)
protected ChannelBase (ChannelManagerBase channelManager)
{
this.manager = manager;
this.manager = channelManager;
}
protected internal override TimeSpan DefaultCloseTimeout {

View File

@ -98,29 +98,29 @@ namespace System.ServiceModel.Channels
}
public TChannel CreateChannel (
EndpointAddress remoteAddress)
EndpointAddress address)
{
if (remoteAddress == null)
throw new ArgumentNullException ("remoteAddress");
return CreateChannel (remoteAddress, remoteAddress.Uri);
if (address == null)
throw new ArgumentNullException ("address");
return CreateChannel (address, address.Uri);
}
public TChannel CreateChannel (
EndpointAddress remoteAddress, Uri via)
EndpointAddress address, Uri via)
{
if (remoteAddress == null)
throw new ArgumentNullException ("remoteAddress");
if (address == null)
throw new ArgumentNullException ("address");
if (via == null)
throw new ArgumentNullException ("via");
ValidateCreateChannel ();
var ch = OnCreateChannel (remoteAddress, via);
var ch = OnCreateChannel (address, via);
channels.Add (ch);
return ch;
}
protected abstract TChannel OnCreateChannel (
EndpointAddress remoteAddress, Uri via);
EndpointAddress address, Uri via);
protected override void OnAbort ()
{

View File

@ -68,19 +68,19 @@ namespace System.ServiceModel.Channels
security = binding as ISecurityCapabilities;
}
public CustomBinding (params BindingElement [] binding)
: this ("CustomBinding", default_ns, binding)
public CustomBinding (params BindingElement [] bindingElementsInTopDownChannelStackOrder)
: this ("CustomBinding", default_ns, bindingElementsInTopDownChannelStackOrder)
{
}
public CustomBinding (IEnumerable<BindingElement> bindingElements)
: this (bindingElements, "CustomBinding", default_ns)
public CustomBinding (IEnumerable<BindingElement> bindingElementsInTopDownChannelStackOrder)
: this (bindingElementsInTopDownChannelStackOrder, "CustomBinding", default_ns)
{
}
public CustomBinding (string name, string ns,
params BindingElement [] binding)
: this (binding, name, ns)
params BindingElement [] bindingElementsInTopDownChannelStackOrder)
: this (bindingElementsInTopDownChannelStackOrder, name, ns)
{
}

View File

@ -47,20 +47,20 @@ namespace System.ServiceModel.Channels
[MonoTODO]
protected abstract bool OnTryCreateException (
Message message, MessageFault fault, out Exception error);
Message message, MessageFault fault, out Exception exception);
[MonoTODO]
protected abstract bool OnTryCreateFaultMessage (
Exception error, out Message message);
Exception exception, out Message message);
public bool TryCreateException (Message message, MessageFault fault, out Exception error)
public bool TryCreateException (Message message, MessageFault fault, out Exception exception)
{
return OnTryCreateException (message, fault, out error);
return OnTryCreateException (message, fault, out exception);
}
public bool TryCreateFaultMessage (Exception error, out Message message)
public bool TryCreateFaultMessage (Exception exception, out Message message)
{
return OnTryCreateFaultMessage (error, out message);
return OnTryCreateFaultMessage (exception, out message);
}
}

View File

@ -67,28 +67,28 @@ namespace System.ServiceModel.Channels
}
protected HttpTransportBindingElement (
HttpTransportBindingElement other)
: base (other)
HttpTransportBindingElement elementToBeCloned)
: base (elementToBeCloned)
{
allow_cookies = other.allow_cookies;
bypass_proxy_on_local = other.bypass_proxy_on_local;
unsafe_ntlm_auth = other.unsafe_ntlm_auth;
use_default_proxy = other.use_default_proxy;
keep_alive_enabled = other.keep_alive_enabled;
max_buffer_size = other.max_buffer_size;
host_cmp_mode = other.host_cmp_mode;
proxy_address = other.proxy_address;
realm = other.realm;
transfer_mode = other.transfer_mode;
allow_cookies = elementToBeCloned.allow_cookies;
bypass_proxy_on_local = elementToBeCloned.bypass_proxy_on_local;
unsafe_ntlm_auth = elementToBeCloned.unsafe_ntlm_auth;
use_default_proxy = elementToBeCloned.use_default_proxy;
keep_alive_enabled = elementToBeCloned.keep_alive_enabled;
max_buffer_size = elementToBeCloned.max_buffer_size;
host_cmp_mode = elementToBeCloned.host_cmp_mode;
proxy_address = elementToBeCloned.proxy_address;
realm = elementToBeCloned.realm;
transfer_mode = elementToBeCloned.transfer_mode;
// FIXME: it does not look safe
timeouts = other.timeouts;
auth_scheme = other.auth_scheme;
proxy_auth_scheme = other.proxy_auth_scheme;
timeouts = elementToBeCloned.timeouts;
auth_scheme = elementToBeCloned.auth_scheme;
proxy_auth_scheme = elementToBeCloned.proxy_auth_scheme;
DecompressionEnabled = other.DecompressionEnabled;
LegacyExtendedProtectionPolicy = other.LegacyExtendedProtectionPolicy;
ExtendedProtectionPolicy = other.ExtendedProtectionPolicy;
cookie_manager = other.cookie_manager;
DecompressionEnabled = elementToBeCloned.DecompressionEnabled;
LegacyExtendedProtectionPolicy = elementToBeCloned.LegacyExtendedProtectionPolicy;
ExtendedProtectionPolicy = elementToBeCloned.ExtendedProtectionPolicy;
cookie_manager = elementToBeCloned.cookie_manager;
}
[DefaultValue (AuthenticationSchemes.Anonymous)]

View File

@ -47,10 +47,10 @@ namespace System.ServiceModel.Channels
}
protected HttpsTransportBindingElement (
HttpsTransportBindingElement other)
: base (other)
HttpsTransportBindingElement elementToBeCloned)
: base (elementToBeCloned)
{
req_cli_cert = other.req_cli_cert;
req_cli_cert = elementToBeCloned.req_cli_cert;
}
public bool RequireClientCertificate {

View File

@ -98,10 +98,10 @@ namespace System.ServiceModel.Channels
return OnGetBody<T> (GetReaderAtBodyContents ());
}
public T GetBody<T> (XmlObjectSerializer xmlFormatter)
public T GetBody<T> (XmlObjectSerializer serializer)
{
// FIXME: Somehow use OnGetBody() here as well?
return (T)xmlFormatter.ReadObject (GetReaderAtBodyContents ());
return (T)serializer.ReadObject (GetReaderAtBodyContents ());
}
protected virtual T OnGetBody<T> (XmlDictionaryReader reader)
@ -369,13 +369,13 @@ namespace System.ServiceModel.Channels
// 5)
public static Message CreateMessage (MessageVersion version,
string action, object body, XmlObjectSerializer xmlFormatter)
string action, object body, XmlObjectSerializer serializer)
{
return body == null ?
CreateMessage (version, action) :
CreateMessage (
version, action,
new XmlObjectSerializerBodyWriter (body, xmlFormatter));
new XmlObjectSerializerBodyWriter (body, serializer));
}
// 6)

View File

@ -42,9 +42,9 @@ namespace System.ServiceModel.Channels
[MonoTODO]
public
MessageEncodingBindingElement (MessageEncodingBindingElement source)
MessageEncodingBindingElement (MessageEncodingBindingElement elementToBeCloned)
{
MessageVersion = source.MessageVersion;
MessageVersion = elementToBeCloned.MessageVersion;
}
public abstract MessageEncoderFactory
@ -52,11 +52,11 @@ namespace System.ServiceModel.Channels
public abstract MessageVersion MessageVersion { get; set; }
public override T GetProperty<T> (BindingContext ctx)
public override T GetProperty<T> (BindingContext context)
{
if (typeof (T) == typeof (MessageVersion))
return (T) (object) MessageVersion;
return ctx.GetInnerProperty<T> ();
return context.GetInnerProperty<T> ();
}
#if !NET_2_1 && !XAMMAC_4_5

View File

@ -397,12 +397,12 @@ namespace System.ServiceModel.Channels
return GetDetail<T> (new DataContractSerializer (typeof (T)));
}
public T GetDetail<T> (XmlObjectSerializer formatter)
public T GetDetail<T> (XmlObjectSerializer serializer)
{
if (!HasDetail)
throw new InvalidOperationException ("This message does not have details.");
return (T) formatter.ReadObject (GetReaderAtDetailContents ());
return (T) serializer.ReadObject (GetReaderAtDetailContents ());
}
public XmlDictionaryReader GetReaderAtDetailContents ()

View File

@ -59,56 +59,56 @@ namespace System.ServiceModel.Channels
return CreateHeader (name, ns, value, default_must_understand);
}
public static MessageHeader CreateHeader (string name, string ns, object value, bool must_understand)
public static MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand)
{
return CreateHeader (name, ns, value, must_understand, default_actor);
return CreateHeader (name, ns, value, mustUnderstand, default_actor);
}
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter)
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer)
{
return CreateHeader (name, ns, value, formatter, default_must_understand,
return CreateHeader (name, ns, value, serializer, default_must_understand,
default_actor, default_relay);
}
public static MessageHeader CreateHeader (string name, string ns, object value,
bool must_understand, string actor)
bool mustUnderstand, string actor)
{
return CreateHeader (name, ns, value, must_understand, actor, default_relay);
return CreateHeader (name, ns, value, mustUnderstand, actor, default_relay);
}
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter,
bool must_understand)
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
bool mustUnderstand)
{
return CreateHeader (name, ns, value, formatter, must_understand, default_actor, default_relay);
return CreateHeader (name, ns, value, serializer, mustUnderstand, default_actor, default_relay);
}
public static MessageHeader CreateHeader (string name, string ns, object value,
bool must_understand, string actor, bool relay)
bool mustUnderstand, string actor, bool relay)
{
return CreateHeader (name, ns, value, new DataContractSerializer (value.GetType ()),
must_understand, actor, relay);
mustUnderstand, actor, relay);
}
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter,
bool must_understand, string actor)
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
bool mustUnderstand, string actor)
{
return CreateHeader (name, ns, value, formatter, must_understand, actor, default_relay);
return CreateHeader (name, ns, value, serializer, mustUnderstand, actor, default_relay);
}
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter,
bool must_understand, string actor, bool relay)
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
bool mustUnderstand, string actor, bool relay)
{
// FIXME: how to get IsReferenceParameter ?
return new DefaultMessageHeader (name, ns, value, formatter, default_is_ref, must_understand, actor, relay);
return new DefaultMessageHeader (name, ns, value, serializer, default_is_ref, mustUnderstand, actor, relay);
}
public virtual bool IsMessageVersionSupported (MessageVersion version)
public virtual bool IsMessageVersionSupported (MessageVersion messageVersion)
{
if (version.Envelope == EnvelopeVersion.Soap12)
if (messageVersion.Envelope == EnvelopeVersion.Soap12)
if (Actor == EnvelopeVersion.Soap11.NextDestinationActorValue)
return false;
if (version.Envelope == EnvelopeVersion.Soap11)
if (messageVersion.Envelope == EnvelopeVersion.Soap11)
if (Actor == EnvelopeVersion.Soap12.NextDestinationActorValue ||
Actor == EnvelopeVersion.Soap12UltimateReceiver)
return false;
@ -117,9 +117,9 @@ namespace System.ServiceModel.Channels
return true;
}
protected abstract void OnWriteHeaderContents (XmlDictionaryWriter writer, MessageVersion version);
protected abstract void OnWriteHeaderContents (XmlDictionaryWriter writer, MessageVersion messageVersion);
protected virtual void OnWriteStartHeader (XmlDictionaryWriter writer, MessageVersion version)
protected virtual void OnWriteStartHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
{
var dic = Constants.SoapDictionary;
XmlDictionaryString name, ns;
@ -128,7 +128,7 @@ namespace System.ServiceModel.Channels
writer.WriteStartElement (prefix, name, ns);
else
writer.WriteStartElement (prefix, this.Name, this.Namespace);
WriteHeaderAttributes (writer, version);
WriteHeaderAttributes (writer, messageVersion);
}
public override string ToString ()
@ -143,58 +143,58 @@ namespace System.ServiceModel.Channels
return sb.ToString ();
}
public void WriteHeader (XmlDictionaryWriter writer, MessageVersion version)
public void WriteHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
{
if (writer == null)
throw new ArgumentNullException ("writer is null.");
if (version == null)
throw new ArgumentNullException ("version is null.");
if (messageVersion == null)
throw new ArgumentNullException ("messageVersion is null.");
if (version.Envelope == EnvelopeVersion.None)
if (messageVersion.Envelope == EnvelopeVersion.None)
return;
WriteStartHeader (writer, version);
WriteHeaderContents (writer, version);
WriteStartHeader (writer, messageVersion);
WriteHeaderContents (writer, messageVersion);
writer.WriteEndElement ();
}
public void WriteHeader (XmlWriter writer, MessageVersion version)
public void WriteHeader (XmlWriter writer, MessageVersion messageVersion)
{
WriteHeader (XmlDictionaryWriter.CreateDictionaryWriter (writer), version);
WriteHeader (XmlDictionaryWriter.CreateDictionaryWriter (writer), messageVersion);
}
protected void WriteHeaderAttributes (XmlDictionaryWriter writer, MessageVersion version)
protected void WriteHeaderAttributes (XmlDictionaryWriter writer, MessageVersion messageVersion)
{
var dic = Constants.SoapDictionary;
if (Id != null)
writer.WriteAttributeString ("u", dic.Add ("Id"), dic.Add (Constants.WsuNamespace), Id);
if (!String.IsNullOrEmpty (Actor)) {
if (version.Envelope == EnvelopeVersion.Soap11)
writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (version.Envelope.Namespace), Actor);
if (messageVersion.Envelope == EnvelopeVersion.Soap11)
writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (messageVersion.Envelope.Namespace), Actor);
if (version.Envelope == EnvelopeVersion.Soap12)
writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (version.Envelope.Namespace), Actor);
if (messageVersion.Envelope == EnvelopeVersion.Soap12)
writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (messageVersion.Envelope.Namespace), Actor);
}
// mustUnderstand is the same across SOAP 1.1 and 1.2
if (MustUnderstand == true)
writer.WriteAttributeString ("s", dic.Add ("mustUnderstand"), dic.Add (version.Envelope.Namespace), "1");
writer.WriteAttributeString ("s", dic.Add ("mustUnderstand"), dic.Add (messageVersion.Envelope.Namespace), "1");
// relay is only available on SOAP 1.2
if (Relay == true && version.Envelope == EnvelopeVersion.Soap12)
writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (version.Envelope.Namespace), "true");
if (Relay == true && messageVersion.Envelope == EnvelopeVersion.Soap12)
writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (messageVersion.Envelope.Namespace), "true");
}
public void WriteHeaderContents (XmlDictionaryWriter writer, MessageVersion version)
public void WriteHeaderContents (XmlDictionaryWriter writer, MessageVersion messageVersion)
{
this.OnWriteHeaderContents (writer, version);
this.OnWriteHeaderContents (writer, messageVersion);
}
public void WriteStartHeader (XmlDictionaryWriter writer, MessageVersion version)
public void WriteStartHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
{
this.OnWriteStartHeader (writer, version);
this.OnWriteStartHeader (writer, messageVersion);
}
public override string Actor { get { return default_actor; }}

View File

@ -72,9 +72,9 @@ namespace System.ServiceModel.Channels
l.Add (header);
}
public void CopyHeaderFrom (Message m, int index)
public void CopyHeaderFrom (Message message, int headerIndex)
{
CopyHeaderFrom (m.Headers, index);
CopyHeaderFrom (message.Headers, headerIndex);
}
public void Clear ()
@ -82,25 +82,25 @@ namespace System.ServiceModel.Channels
l.Clear ();
}
public void CopyHeaderFrom (MessageHeaders headers, int index)
public void CopyHeaderFrom (MessageHeaders collection, int headerIndex)
{
l.Add (headers [index]);
l.Add (collection [headerIndex]);
}
public void CopyHeadersFrom (Message m)
public void CopyHeadersFrom (Message message)
{
CopyHeadersFrom (m.Headers);
CopyHeadersFrom (message.Headers);
}
public void CopyHeadersFrom (MessageHeaders headers)
public void CopyHeadersFrom (MessageHeaders collection)
{
foreach (MessageHeaderInfo h in headers)
foreach (MessageHeaderInfo h in collection)
l.Add (h);
}
public void CopyTo (MessageHeaderInfo [] dst, int index)
public void CopyTo (MessageHeaderInfo [] array, int index)
{
l.CopyTo (dst, index);
l.CopyTo (array, index);
}
public int FindHeader (string name, string ns)
@ -203,11 +203,11 @@ namespace System.ServiceModel.Channels
return GetHeader<T> (idx, serializer);
}
public XmlDictionaryReader GetReaderAtHeader (int index)
public XmlDictionaryReader GetReaderAtHeader (int headerIndex)
{
if (index >= l.Count)
throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", index));
MessageHeader item = (MessageHeader) l [index];
if (headerIndex >= l.Count)
throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", l.Count));
MessageHeader item = (MessageHeader) l [headerIndex];
XmlReader reader =
item is MessageHeader.XmlMessageHeader ?
@ -231,9 +231,9 @@ namespace System.ServiceModel.Channels
throw new NotImplementedException ();
}
public void Insert (int index, MessageHeader header)
public void Insert (int headerIndex, MessageHeader header)
{
l.Insert (index, header);
l.Insert (headerIndex, header);
}
public void RemoveAll (string name, string ns)
@ -251,9 +251,9 @@ namespace System.ServiceModel.Channels
l.RemoveAt (l.Count - 1);
}
public void RemoveAt (int index)
public void RemoveAt (int headerIndex)
{
l.RemoveAt (index);
l.RemoveAt (headerIndex);
}
IEnumerator IEnumerable.GetEnumerator ()
@ -261,48 +261,48 @@ namespace System.ServiceModel.Channels
return ((IEnumerable) l).GetEnumerator ();
}
public void WriteHeader (int index, XmlDictionaryWriter writer)
public void WriteHeader (int headerIndex, XmlDictionaryWriter writer)
{
if (version.Envelope == EnvelopeVersion.None)
return;
WriteStartHeader (index, writer);
WriteHeaderContents (index, writer);
WriteStartHeader (headerIndex, writer);
WriteHeaderContents (headerIndex, writer);
writer.WriteEndElement ();
}
public void WriteHeader (int index, XmlWriter writer)
public void WriteHeader (int headerIndex, XmlWriter writer)
{
WriteHeader (index, XmlDictionaryWriter.CreateDictionaryWriter (writer));
WriteHeader (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
}
public void WriteHeaderContents (int index, XmlDictionaryWriter writer)
public void WriteHeaderContents (int headerIndex, XmlDictionaryWriter writer)
{
if (index > l.Count)
throw new ArgumentOutOfRangeException ("There is no header at position " + index + ".");
if (headerIndex > l.Count)
throw new ArgumentOutOfRangeException ("There is no header at position " + headerIndex + ".");
MessageHeader h = l [index] as MessageHeader;
MessageHeader h = l [headerIndex] as MessageHeader;
h.WriteHeaderContents (writer, version);
}
public void WriteHeaderContents (int index, XmlWriter writer)
public void WriteHeaderContents (int headerIndex, XmlWriter writer)
{
WriteHeaderContents (index, XmlDictionaryWriter.CreateDictionaryWriter (writer));
WriteHeaderContents (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
}
public void WriteStartHeader (int index, XmlDictionaryWriter writer)
public void WriteStartHeader (int headerIndex, XmlDictionaryWriter writer)
{
if (index > l.Count)
throw new ArgumentOutOfRangeException ("There is no header at position " + index + ".");
if (headerIndex > l.Count)
throw new ArgumentOutOfRangeException ("There is no header at position " + headerIndex + ".");
MessageHeader h = l [index] as MessageHeader;
MessageHeader h = l [headerIndex] as MessageHeader;
h.WriteStartHeader (writer, version);
}
public void WriteStartHeader (int index, XmlWriter writer)
public void WriteStartHeader (int headerIndex, XmlWriter writer)
{
WriteStartHeader (index, XmlDictionaryWriter.CreateDictionaryWriter (writer));
WriteStartHeader (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
}
public string Action {

View File

@ -53,36 +53,36 @@ namespace System.ServiceModel.Channels {
this.addressing = addressing;
}
public static MessageVersion CreateVersion (EnvelopeVersion envelope_version)
public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion)
{
return CreateVersion (envelope_version,
return CreateVersion (envelopeVersion,
AddressingVersion.WSAddressing10);
}
public static MessageVersion CreateVersion (EnvelopeVersion envelope_version,
AddressingVersion addressing_version)
public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion,
AddressingVersion addressingVersion)
{
if (envelope_version == EnvelopeVersion.None && addressing_version == AddressingVersion.None)
if (envelopeVersion == EnvelopeVersion.None && addressingVersion == AddressingVersion.None)
return None;
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.None)
if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.None)
return Soap11;
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressing10)
if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressing10)
return Soap12WSAddressing10;
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.None)
if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.None)
return Soap12;
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressing10)
if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressing10)
return Soap11WSAddressing10;
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressingAugust2004)
if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
return Soap11WSAddressingAugust2004;
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressingAugust2004)
if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
return Soap12WSAddressingAugust2004;
throw new ArgumentException (string.Format ("EnvelopeVersion {0} cannot be used with AddressingVersion {1}", envelope_version, addressing_version));
throw new ArgumentException (string.Format ("EnvelopeVersion {0} cannot be used with AddressingVersion {1}", envelopeVersion, addressingVersion));
}
public override bool Equals (object value)
public override bool Equals (object obj)
{
MessageVersion other = value as MessageVersion;
MessageVersion other = obj as MessageVersion;
if (other == null)
return false;

View File

@ -531,29 +531,29 @@ namespace System.ServiceModel.Channels
#endif
public static SecurityBindingElement
CreateSecureConversationBindingElement (SecurityBindingElement binding)
CreateSecureConversationBindingElement (SecurityBindingElement bootstrapSecurity)
{
return CreateSecureConversationBindingElement (binding, false);
return CreateSecureConversationBindingElement (bootstrapSecurity, false);
}
public static SecurityBindingElement
CreateSecureConversationBindingElement (
SecurityBindingElement binding, bool requireCancellation)
SecurityBindingElement bootstrapSecurity, bool requireCancellation)
{
return CreateSecureConversationBindingElement (binding, requireCancellation, null);
return CreateSecureConversationBindingElement (bootstrapSecurity, requireCancellation, null);
}
public static SecurityBindingElement
CreateSecureConversationBindingElement (
SecurityBindingElement binding, bool requireCancellation,
ChannelProtectionRequirements protectionRequirements)
SecurityBindingElement bootstrapSecurity, bool requireCancellation,
ChannelProtectionRequirements bootstrapProtectionRequirements)
{
#if !NET_2_1 && !XAMMAC_4_5
SymmetricSecurityBindingElement be =
new SymmetricSecurityBindingElement ();
be.ProtectionTokenParameters =
new SecureConversationSecurityTokenParameters (
binding, requireCancellation, protectionRequirements);
bootstrapSecurity, requireCancellation, bootstrapProtectionRequirements);
return be;
#else
throw new NotImplementedException ();

View File

@ -53,12 +53,12 @@ namespace System.ServiceModel.Channels
}
protected TcpTransportBindingElement (
TcpTransportBindingElement other)
: base (other)
TcpTransportBindingElement elementToBeCloned)
: base (elementToBeCloned)
{
listen_backlog = other.listen_backlog;
port_sharing_enabled = other.port_sharing_enabled;
pool.CopyPropertiesFrom (other.pool);
listen_backlog = elementToBeCloned.listen_backlog;
port_sharing_enabled = elementToBeCloned.port_sharing_enabled;
pool.CopyPropertiesFrom (elementToBeCloned.pool);
}
public TcpConnectionPoolSettings ConnectionPoolSettings {

View File

@ -48,12 +48,12 @@ namespace System.ServiceModel.Channels
}
protected TransportBindingElement (
TransportBindingElement other)
: base (other)
TransportBindingElement elementToBeCloned)
: base (elementToBeCloned)
{
manual_addressing = other.manual_addressing;
max_buffer_pool_size = other.max_buffer_pool_size;
max_recv_message_size = other.max_recv_message_size;
manual_addressing = elementToBeCloned.manual_addressing;
max_buffer_pool_size = elementToBeCloned.max_buffer_pool_size;
max_recv_message_size = elementToBeCloned.max_recv_message_size;
}
public virtual bool ManualAddressing {