You've already forked linux-packaging-mono
Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
@ -31,229 +31,3 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !NET_4_5
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Security.Principal;
|
||||
using System.IdentityModel.Claims;
|
||||
using System.IdentityModel.Policy;
|
||||
using System.IdentityModel.Tokens;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Description;
|
||||
using System.ServiceModel.Diagnostics;
|
||||
using System.ServiceModel.Dispatcher;
|
||||
using System.ServiceModel.MsmqIntegration;
|
||||
using System.ServiceModel.PeerResolvers;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
namespace System.ServiceModel.Configuration
|
||||
{
|
||||
public class BasicHttpBindingElement
|
||||
: StandardBindingElement, IBindingConfigurationElement
|
||||
{
|
||||
ConfigurationPropertyCollection _properties;
|
||||
|
||||
public BasicHttpBindingElement ()
|
||||
{
|
||||
}
|
||||
|
||||
public BasicHttpBindingElement (string name) : base (name) { }
|
||||
|
||||
// Properties
|
||||
|
||||
[ConfigurationProperty ("allowCookies",
|
||||
DefaultValue = false,
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public bool AllowCookies {
|
||||
get { return (bool) this ["allowCookies"]; }
|
||||
set { this ["allowCookies"] = value; }
|
||||
}
|
||||
|
||||
protected override Type BindingElementType {
|
||||
get { return typeof (BasicHttpBinding); }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("bypassProxyOnLocal",
|
||||
DefaultValue = false,
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public bool BypassProxyOnLocal {
|
||||
get { return (bool) this ["bypassProxyOnLocal"]; }
|
||||
set { this ["bypassProxyOnLocal"] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("hostNameComparisonMode",
|
||||
DefaultValue = "StrongWildcard",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public HostNameComparisonMode HostNameComparisonMode {
|
||||
get { return (HostNameComparisonMode) this ["hostNameComparisonMode"]; }
|
||||
set { this ["hostNameComparisonMode"] = value; }
|
||||
}
|
||||
|
||||
[LongValidator ( MinValue = 0,
|
||||
MaxValue = 9223372036854775807,
|
||||
ExcludeRange = false)]
|
||||
[ConfigurationProperty ("maxBufferPoolSize",
|
||||
DefaultValue = "524288",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public long MaxBufferPoolSize {
|
||||
get { return (long) this ["maxBufferPoolSize"]; }
|
||||
set { this ["maxBufferPoolSize"] = value; }
|
||||
}
|
||||
|
||||
[IntegerValidator ( MinValue = 1,
|
||||
MaxValue = int.MaxValue,
|
||||
ExcludeRange = false)]
|
||||
[ConfigurationProperty ("maxBufferSize",
|
||||
DefaultValue = "65536",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public int MaxBufferSize {
|
||||
get { return (int) this ["maxBufferSize"]; }
|
||||
set { this ["maxBufferSize"] = value; }
|
||||
}
|
||||
|
||||
[LongValidator ( MinValue = 1,
|
||||
MaxValue = 9223372036854775807,
|
||||
ExcludeRange = false)]
|
||||
[ConfigurationProperty ("maxReceivedMessageSize",
|
||||
DefaultValue = "65536",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public long MaxReceivedMessageSize {
|
||||
get { return (long) this ["maxReceivedMessageSize"]; }
|
||||
set { this ["maxReceivedMessageSize"] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("messageEncoding",
|
||||
DefaultValue = "Text",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public WSMessageEncoding MessageEncoding {
|
||||
get { return (WSMessageEncoding) this ["messageEncoding"]; }
|
||||
set { this ["messageEncoding"] = value; }
|
||||
}
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get {
|
||||
if (_properties == null) {
|
||||
_properties = base.Properties;
|
||||
_properties.Add (new ConfigurationProperty ("allowCookies", typeof (bool), "false", null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("bypassProxyOnLocal", typeof (bool), "false", null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("hostNameComparisonMode", typeof (HostNameComparisonMode), "StrongWildcard", null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("maxBufferPoolSize", typeof (long), "524288", null, new LongValidator (0, 9223372036854775807, false), ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("maxBufferSize", typeof (int), "65536", null, new IntegerValidator (1, int.MaxValue, false), ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("maxReceivedMessageSize", typeof (long), "65536", null, new LongValidator (1, 9223372036854775807, false), ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("messageEncoding", typeof (WSMessageEncoding), "Text", null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("proxyAddress", typeof (Uri), null, new UriTypeConverter (), null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("readerQuotas", typeof (XmlDictionaryReaderQuotasElement), null, null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("security", typeof (BasicHttpSecurityElement), null, null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("textEncoding", typeof (Encoding), BasicHttpBinding.DefaultTextEncoding, EncodingConverter.Instance, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("transferMode", typeof (TransferMode), "Buffered", null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("useDefaultWebProxy", typeof (bool), "true", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
|
||||
}
|
||||
return _properties;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("proxyAddress",
|
||||
DefaultValue = null,
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public Uri ProxyAddress {
|
||||
get { return (Uri) this ["proxyAddress"]; }
|
||||
set { this ["proxyAddress"] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("readerQuotas",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public XmlDictionaryReaderQuotasElement ReaderQuotas {
|
||||
get { return (XmlDictionaryReaderQuotasElement) this ["readerQuotas"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("security",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public BasicHttpSecurityElement Security {
|
||||
get { return (BasicHttpSecurityElement) this ["security"]; }
|
||||
}
|
||||
|
||||
[TypeConverter (typeof (EncodingConverter))]
|
||||
[ConfigurationProperty ("textEncoding",
|
||||
DefaultValue = "utf-8",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public Encoding TextEncoding {
|
||||
get { return (Encoding) this ["textEncoding"]; }
|
||||
set { this ["textEncoding"] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("transferMode",
|
||||
DefaultValue = "Buffered",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public TransferMode TransferMode {
|
||||
get { return (TransferMode) this ["transferMode"]; }
|
||||
set { this ["transferMode"] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty ("useDefaultWebProxy",
|
||||
DefaultValue = true,
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public bool UseDefaultWebProxy {
|
||||
get { return (bool) this ["useDefaultWebProxy"]; }
|
||||
set { this ["useDefaultWebProxy"] = value; }
|
||||
}
|
||||
|
||||
protected override void OnApplyConfiguration (Binding binding)
|
||||
{
|
||||
BasicHttpBinding basicHttpBinding = (BasicHttpBinding) binding;
|
||||
|
||||
basicHttpBinding.AllowCookies = AllowCookies;
|
||||
basicHttpBinding.BypassProxyOnLocal = BypassProxyOnLocal;
|
||||
basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode;
|
||||
basicHttpBinding.MaxBufferPoolSize = MaxBufferPoolSize;
|
||||
basicHttpBinding.MaxBufferSize = MaxBufferSize;
|
||||
basicHttpBinding.MaxReceivedMessageSize = MaxReceivedMessageSize;
|
||||
basicHttpBinding.MessageEncoding = MessageEncoding;
|
||||
basicHttpBinding.ProxyAddress = ProxyAddress;
|
||||
|
||||
ReaderQuotas.ApplyConfiguration (basicHttpBinding.ReaderQuotas);
|
||||
|
||||
basicHttpBinding.Security.Mode = Security.Mode;
|
||||
Security.Transport.ApplyConfiguration (basicHttpBinding.Security.Transport);
|
||||
basicHttpBinding.TextEncoding = TextEncoding;
|
||||
basicHttpBinding.TransferMode = TransferMode;
|
||||
basicHttpBinding.UseDefaultWebProxy = UseDefaultWebProxy;
|
||||
}
|
||||
|
||||
protected internal override void InitializeFrom (Binding binding)
|
||||
{
|
||||
BasicHttpBinding b = (BasicHttpBinding) binding;
|
||||
|
||||
base.InitializeFrom (binding);
|
||||
AllowCookies = b.AllowCookies;
|
||||
BypassProxyOnLocal = b.BypassProxyOnLocal;
|
||||
HostNameComparisonMode = b.HostNameComparisonMode;
|
||||
MaxBufferPoolSize = b.MaxBufferPoolSize;
|
||||
MaxBufferSize = b.MaxBufferSize;
|
||||
MaxReceivedMessageSize = b.MaxReceivedMessageSize;
|
||||
MessageEncoding = b.MessageEncoding;
|
||||
ProxyAddress = b.ProxyAddress;
|
||||
|
||||
ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
|
||||
|
||||
Security.Mode = b.Security.Mode;
|
||||
Security.Transport.ApplyConfiguration (b.Security.Transport);
|
||||
TextEncoding = b.TextEncoding;
|
||||
TransferMode = b.TransferMode;
|
||||
UseDefaultWebProxy = b.UseDefaultWebProxy;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -68,13 +68,11 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (BasicHttpBindingCollectionElement) this ["basicHttpBinding"]; }
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
[ConfigurationProperty ("basicHttpsBinding",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public BasicHttpsBindingCollectionElement BasicHttpsBinding {
|
||||
get { return (BasicHttpsBindingCollectionElement) this ["basicHttpsBinding"]; }
|
||||
}
|
||||
#endif
|
||||
|
||||
public List<BindingCollectionElement> BindingCollections {
|
||||
get {
|
||||
|
@ -68,10 +68,8 @@ namespace System.ServiceModel.Configuration
|
||||
static ConfigurationProperty headers;
|
||||
static ConfigurationProperty identity;
|
||||
static ConfigurationProperty name;
|
||||
#if NET_4_0
|
||||
static ConfigurationProperty endpoint_configuration;
|
||||
static ConfigurationProperty kind;
|
||||
#endif
|
||||
|
||||
static ChannelEndpointElement ()
|
||||
{
|
||||
@ -108,10 +106,8 @@ namespace System.ServiceModel.Configuration
|
||||
typeof (string), "", new StringConverter (), null,
|
||||
ConfigurationPropertyOptions.IsKey);
|
||||
|
||||
#if NET_4_0
|
||||
endpoint_configuration = new ConfigurationProperty ("endpointConfiguration", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
|
||||
kind = new ConfigurationProperty ("kind", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
|
||||
#endif
|
||||
|
||||
properties.Add (address);
|
||||
properties.Add (behavior_configuration);
|
||||
@ -122,10 +118,8 @@ namespace System.ServiceModel.Configuration
|
||||
properties.Add (identity);
|
||||
properties.Add (name);
|
||||
|
||||
#if NET_4_0
|
||||
properties.Add (endpoint_configuration);
|
||||
properties.Add (kind);
|
||||
#endif
|
||||
}
|
||||
|
||||
public ChannelEndpointElement ()
|
||||
@ -211,7 +205,6 @@ namespace System.ServiceModel.Configuration
|
||||
set { base [name] = value; }
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[StringValidator (MinLength = 0)]
|
||||
[ConfigurationProperty ("endpointConfiguration", DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)]
|
||||
public string EndpointConfiguration {
|
||||
@ -225,7 +218,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (string) base [kind]; }
|
||||
set { base [kind] = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get { return properties; }
|
||||
|
@ -77,7 +77,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (ExtensionsSection) GetSection ("system.serviceModel/extensions"); }
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
public static ProtocolMappingSection ProtocolMappingSection {
|
||||
get {
|
||||
return (ProtocolMappingSection) GetSection ("system.serviceModel/protocolMapping");
|
||||
@ -89,7 +88,6 @@ namespace System.ServiceModel.Configuration
|
||||
return (StandardEndpointsSection) GetSection ("system.serviceModel/standardEndpoints");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public static Binding CreateBinding (string binding, string bindingConfiguration)
|
||||
{
|
||||
@ -124,9 +122,7 @@ namespace System.ServiceModel.Configuration
|
||||
|
||||
if (cached_assemblies.Contains (ass))
|
||||
continue;
|
||||
#if NET_4_0
|
||||
if (!ass.IsDynamic)
|
||||
#endif
|
||||
cached_assemblies.Add (ass);
|
||||
|
||||
foreach (var t in ass.GetTypes ()) {
|
||||
@ -151,7 +147,6 @@ namespace System.ServiceModel.Configuration
|
||||
return null;
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
public static Binding GetBindingByProtocolMapping (Uri address)
|
||||
{
|
||||
ProtocolMappingElement el = ConfigUtil.ProtocolMappingSection.ProtocolMappingCollection [address.Scheme];
|
||||
@ -207,7 +202,6 @@ namespace System.ServiceModel.Configuration
|
||||
|
||||
return inst;
|
||||
}
|
||||
#endif
|
||||
|
||||
public static KeyedByTypeCollection<IEndpointBehavior> CreateEndpointBehaviors (string bindingConfiguration)
|
||||
{
|
||||
|
@ -59,10 +59,8 @@ namespace System.ServiceModel.Configuration
|
||||
{
|
||||
// Static Fields
|
||||
static ConfigurationPropertyCollection properties;
|
||||
#if NET_4_0
|
||||
static ConfigurationProperty end_to_end_tracing;
|
||||
static ConfigurationProperty etw_provider_id;
|
||||
#endif
|
||||
static ConfigurationProperty message_logging;
|
||||
static ConfigurationProperty performance_counters;
|
||||
static ConfigurationProperty performance_counter_enabled;
|
||||
@ -71,11 +69,9 @@ namespace System.ServiceModel.Configuration
|
||||
static DiagnosticSection ()
|
||||
{
|
||||
properties = new ConfigurationPropertyCollection ();
|
||||
#if NET_4_0
|
||||
end_to_end_tracing = new ConfigurationProperty ("endToEndTracing", typeof (EndToEndTracingElement), null, null, null, ConfigurationPropertyOptions.None);
|
||||
|
||||
etw_provider_id = new ConfigurationProperty ("etwProviderId", typeof (string), null, null, null, ConfigurationPropertyOptions.None);
|
||||
#endif
|
||||
message_logging = new ConfigurationProperty ("messageLogging", typeof (MessageLoggingElement), null, null, null, ConfigurationPropertyOptions.None);
|
||||
|
||||
performance_counters = new ConfigurationProperty ("performanceCounters", typeof (PerformanceCounterScope), "Off", null, null, ConfigurationPropertyOptions.None);
|
||||
@ -85,10 +81,8 @@ namespace System.ServiceModel.Configuration
|
||||
wmi_provider_enabled = new ConfigurationProperty ("wmiProviderEnabled",
|
||||
typeof (bool), "false", new BooleanConverter (), null, ConfigurationPropertyOptions.None);
|
||||
|
||||
#if NET_4_0
|
||||
properties.Add (end_to_end_tracing);
|
||||
properties.Add (etw_provider_id);
|
||||
#endif
|
||||
properties.Add (message_logging);
|
||||
properties.Add (performance_counters);
|
||||
properties.Add (performance_counter_enabled);
|
||||
@ -102,7 +96,6 @@ namespace System.ServiceModel.Configuration
|
||||
|
||||
// Properties
|
||||
|
||||
#if NET_4_0
|
||||
[ConfigurationProperty ("endToEndTracing", Options = ConfigurationPropertyOptions.None)]
|
||||
public EndToEndTracingElement EndToEndTracing {
|
||||
get { return (EndToEndTracingElement) base [end_to_end_tracing]; }
|
||||
@ -114,7 +107,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (string) base [etw_provider_id]; }
|
||||
set { base [etw_provider_id] = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
[ConfigurationProperty ("messageLogging",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
#if NET_4_0
|
||||
//
|
||||
// Author:
|
||||
// Atsushi Enomoto <atsushi@ximian.com>
|
||||
@ -111,4 +110,3 @@ namespace System.ServiceModel.Configuration
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -26,7 +26,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -79,4 +78,3 @@ namespace System.ServiceModel.Configuration
|
||||
protected internal abstract bool TryAdd (string name, ServiceEndpoint endpoint, ConfigurationType config);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -79,13 +79,11 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (ExtensionElementCollection) base ["bindingExtensions"]; }
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[ConfigurationProperty ("endpointExtensions",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public ExtensionElementCollection EndpointExtensions {
|
||||
get { return (ExtensionElementCollection) base ["endpointExtensions"]; }
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get {
|
||||
@ -94,9 +92,7 @@ namespace System.ServiceModel.Configuration
|
||||
_properties.Add (new ConfigurationProperty ("behaviorExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("bindingElementExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("bindingExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
|
||||
#if NET_4_0
|
||||
_properties.Add (new ConfigurationProperty ("endpointExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
|
||||
#endif
|
||||
}
|
||||
return _properties;
|
||||
}
|
||||
@ -106,9 +102,7 @@ namespace System.ServiceModel.Configuration
|
||||
InitializeBehaviorExtensionsDefault ();
|
||||
InitializeBindingElementExtensionsDefault ();
|
||||
InitializeBindingExtensionsDefault ();
|
||||
#if NET_4_0
|
||||
InitializeEndpointExtensionsDefault ();
|
||||
#endif
|
||||
}
|
||||
|
||||
void InitializeBindingExtensionsDefault () {
|
||||
@ -171,11 +165,9 @@ namespace System.ServiceModel.Configuration
|
||||
BehaviorExtensions.Add (new ExtensionElement ("transactedBatching", typeof (TransactedBatchingElement).AssemblyQualifiedName));
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
void InitializeEndpointExtensionsDefault () {
|
||||
EndpointExtensions.Add (new ExtensionElement ("mexEndpoint", typeof (ServiceMetadataEndpointCollectionElement).AssemblyQualifiedName));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,10 +35,8 @@ using System.Configuration;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Reflection;
|
||||
#if NET_4_0
|
||||
using System.Security.Authentication.ExtendedProtection;
|
||||
using System.Security.Authentication.ExtendedProtection.Configuration;
|
||||
#endif
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Security.Principal;
|
||||
using System.IdentityModel.Claims;
|
||||
@ -142,16 +140,13 @@ namespace System.ServiceModel.Configuration
|
||||
_properties.Add (new ConfigurationProperty ("transferMode", typeof (TransferMode), "Buffered", null, null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("unsafeConnectionNtlmAuthentication", typeof (bool), "false", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("useDefaultWebProxy", typeof (bool), "true", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
|
||||
#if NET_4_0
|
||||
_properties.Add (new ConfigurationProperty ("decompressionEnabled", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None));
|
||||
_properties.Add (new ConfigurationProperty ("extendedProtectionPolicy", typeof (ExtendedProtectionPolicyElement), null, new ExtendedProtectionPolicyTypeConverter (), null, ConfigurationPropertyOptions.None));
|
||||
#endif
|
||||
}
|
||||
return _properties;
|
||||
}
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[ConfigurationProperty ("decompressionEnabled",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public bool DecompressionEnabled {
|
||||
@ -165,7 +160,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (ExtendedProtectionPolicyElement) base ["extendedProtectionPolicy"]; }
|
||||
set { base ["extendedProtectionPolicy"] = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
[ConfigurationProperty ("proxyAddress",
|
||||
Options = ConfigurationPropertyOptions.None,
|
||||
@ -234,11 +228,9 @@ namespace System.ServiceModel.Configuration
|
||||
b.TransferMode = TransferMode;
|
||||
b.UnsafeConnectionNtlmAuthentication = UnsafeConnectionNtlmAuthentication;
|
||||
b.UseDefaultWebProxy = UseDefaultWebProxy;
|
||||
#if NET_4_0
|
||||
b.DecompressionEnabled = DecompressionEnabled;
|
||||
// FIXME: enable this.
|
||||
//b.ExtendedProtectionPolicy = ExtendedProtectionPolicy.BuildPolicy ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void CopyFrom (ServiceModelExtensionElement from)
|
||||
@ -257,7 +249,6 @@ namespace System.ServiceModel.Configuration
|
||||
TransferMode = e.TransferMode;
|
||||
UnsafeConnectionNtlmAuthentication = e.UnsafeConnectionNtlmAuthentication;
|
||||
UseDefaultWebProxy = e.UseDefaultWebProxy;
|
||||
#if NET_4_0
|
||||
DecompressionEnabled = e.DecompressionEnabled;
|
||||
// FIXME: enable this.
|
||||
/*
|
||||
@ -265,7 +256,6 @@ namespace System.ServiceModel.Configuration
|
||||
foreach (var sne in ExtendedProtectionPolicy.CustomServiceNames)
|
||||
ExtendedProtectionPolicy.CustomServiceNames.Add (sne);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override TransportBindingElement CreateDefaultBindingElement ()
|
||||
@ -289,7 +279,6 @@ namespace System.ServiceModel.Configuration
|
||||
TransferMode = b.TransferMode;
|
||||
UnsafeConnectionNtlmAuthentication = b.UnsafeConnectionNtlmAuthentication;
|
||||
UseDefaultWebProxy = b.UseDefaultWebProxy;
|
||||
#if NET_4_0
|
||||
DecompressionEnabled = b.DecompressionEnabled;
|
||||
// FIXME: enable this.
|
||||
/*
|
||||
@ -297,7 +286,6 @@ namespace System.ServiceModel.Configuration
|
||||
foreach (var sn in b.ExtendedProtectionPolicy.CustomServiceNames)
|
||||
ExtendedProtectionPolicy.CustomServiceNames.Add (new ServiceNameElement () { Name = sn.ToString () });
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,10 +35,8 @@ using System.Configuration;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Reflection;
|
||||
#if NET_4_0
|
||||
using System.Security.Authentication.ExtendedProtection;
|
||||
using System.Security.Authentication.ExtendedProtection.Configuration;
|
||||
#endif
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Security.Principal;
|
||||
using System.IdentityModel.Claims;
|
||||
@ -84,18 +82,14 @@ namespace System.ServiceModel.Configuration
|
||||
typeof (string), "", new StringConverter (), null,
|
||||
ConfigurationPropertyOptions.None);
|
||||
|
||||
#if NET_4_0
|
||||
extended_protection_policy = new ConfigurationProperty ("extendedProtectionPolicy",
|
||||
typeof (ExtendedProtectionPolicyElement), null, new ExtendedProtectionPolicyTypeConverter (), null,
|
||||
ConfigurationPropertyOptions.None);
|
||||
#endif
|
||||
|
||||
properties.Add (client_credential_type);
|
||||
properties.Add (proxy_credential_type);
|
||||
properties.Add (realm);
|
||||
#if NET_4_0
|
||||
properties.Add (extended_protection_policy);
|
||||
#endif
|
||||
}
|
||||
|
||||
public HttpTransportSecurityElement ()
|
||||
@ -113,14 +107,12 @@ namespace System.ServiceModel.Configuration
|
||||
set { base [client_credential_type] = value; }
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[ConfigurationProperty ("extendedProtectionPolicy",
|
||||
Options = ConfigurationPropertyOptions.None)]
|
||||
public ExtendedProtectionPolicyElement extendedProtectionPolicy {
|
||||
get { return (ExtendedProtectionPolicyElement) base [extended_protection_policy]; }
|
||||
set { base [extended_protection_policy] = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get { return properties; }
|
||||
@ -150,10 +142,8 @@ namespace System.ServiceModel.Configuration
|
||||
security.ClientCredentialType = ClientCredentialType;
|
||||
security.ProxyCredentialType = ProxyCredentialType;
|
||||
security.Realm = Realm;
|
||||
#if NET_4_0
|
||||
// FIXME: enable this
|
||||
// security.ExtendedProtectionPolicy = ExtendedProtectionPolicy.BuildPolicy ();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,6 @@ namespace System.ServiceModel.Configuration
|
||||
set { base [log_entire_message] = value; }
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[ConfigurationProperty ("logKnownPii",
|
||||
Options = ConfigurationPropertyOptions.None,
|
||||
DefaultValue = false)]
|
||||
@ -130,7 +129,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (bool) base [log_known_pii]; }
|
||||
set { base [log_known_pii] = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
[ConfigurationProperty ("logMalformedMessages",
|
||||
Options = ConfigurationPropertyOptions.None,
|
||||
|
@ -58,11 +58,7 @@ namespace System.ServiceModel.Configuration
|
||||
: ServiceModelExtensionCollectionElement<TServiceModelExtensionElement>, ICollection<TServiceModelExtensionElement>, IEnumerable<TServiceModelExtensionElement>, IEnumerable
|
||||
where TServiceModelExtensionElement : ServiceModelExtensionElement
|
||||
{
|
||||
#if NET_4_0
|
||||
const int minNameLength = 0;
|
||||
#else
|
||||
const int minNameLength = 1;
|
||||
#endif
|
||||
ConfigurationPropertyCollection _properties;
|
||||
|
||||
internal NamedServiceModelExtensionCollectionElement ()
|
||||
@ -71,11 +67,7 @@ namespace System.ServiceModel.Configuration
|
||||
|
||||
|
||||
// Properties
|
||||
#if NET_4_0
|
||||
[StringValidator ( MinLength = 0, MaxLength = int.MaxValue, InvalidCharacters = null)]
|
||||
#else
|
||||
[StringValidator ( MinLength = 1, MaxLength = int.MaxValue, InvalidCharacters = null)]
|
||||
#endif
|
||||
[ConfigurationProperty ("name",
|
||||
Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey,
|
||||
IsRequired = true,
|
||||
|
@ -26,7 +26,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -109,4 +108,3 @@ namespace System.ServiceModel.Configuration
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -69,4 +68,3 @@ namespace System.ServiceModel.Configuration
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -25,7 +25,6 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
@ -90,4 +89,3 @@ namespace System.ServiceModel.Configuration
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -82,7 +82,6 @@ namespace System.ServiceModel.Configuration
|
||||
XmlReader reader, bool serializeCollectionKey) {
|
||||
base.DeserializeElement (reader, serializeCollectionKey);
|
||||
}
|
||||
#if NET_4_0
|
||||
protected override void BaseAdd (ConfigurationElement element)
|
||||
{
|
||||
var sbe = element as ServiceBehaviorElement;
|
||||
@ -91,7 +90,6 @@ namespace System.ServiceModel.Configuration
|
||||
|
||||
base.BaseAdd (sbe);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -71,11 +71,9 @@ namespace System.ServiceModel.Configuration
|
||||
static ConfigurationProperty listen_uri;
|
||||
static ConfigurationProperty listen_uri_mode;
|
||||
static ConfigurationProperty name;
|
||||
#if NET_4_0
|
||||
static ConfigurationProperty endpoint_configuration;
|
||||
static ConfigurationProperty is_system_endpoint;
|
||||
static ConfigurationProperty kind;
|
||||
#endif
|
||||
|
||||
static ServiceEndpointElement ()
|
||||
{
|
||||
@ -128,11 +126,9 @@ namespace System.ServiceModel.Configuration
|
||||
typeof (string), "", new StringConverter (), new StringValidator (0, int.MaxValue, null),
|
||||
ConfigurationPropertyOptions.None);
|
||||
|
||||
#if NET_4_0
|
||||
endpoint_configuration = new ConfigurationProperty ("endpointConfiguration", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
|
||||
is_system_endpoint = new ConfigurationProperty ("isSystemEndpoint", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
|
||||
kind = new ConfigurationProperty ("kind", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
|
||||
#endif
|
||||
|
||||
properties.Add (address);
|
||||
properties.Add (behavior_configuration);
|
||||
@ -147,11 +143,9 @@ namespace System.ServiceModel.Configuration
|
||||
properties.Add (listen_uri_mode);
|
||||
properties.Add (name);
|
||||
|
||||
#if NET_4_0
|
||||
properties.Add (endpoint_configuration);
|
||||
properties.Add (is_system_endpoint);
|
||||
properties.Add (kind);
|
||||
#endif
|
||||
}
|
||||
|
||||
public ServiceEndpointElement ()
|
||||
@ -253,7 +247,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (IdentityElement) base [identity]; }
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[StringValidator (MinLength = 0)]
|
||||
[ConfigurationProperty ("endpointConfiguration", DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)]
|
||||
public string EndpointConfiguration {
|
||||
@ -273,7 +266,6 @@ namespace System.ServiceModel.Configuration
|
||||
get { return (string) base [kind]; }
|
||||
set { base [kind] = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
[ConfigurationProperty ("listenUri",
|
||||
Options = ConfigurationPropertyOptions.None,
|
||||
|
@ -76,10 +76,8 @@ namespace System.ServiceModel.Configuration
|
||||
GetHashCode (el.BindingConfiguration) +
|
||||
GetHashCode (el.BindingName) +
|
||||
GetHashCode (el.BindingNamespace) +
|
||||
#if NET_4_0
|
||||
GetHashCode (el.EndpointConfiguration) +
|
||||
GetHashCode (el.Kind) +
|
||||
#endif
|
||||
GetHashCode (el.Contract);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
@ -37,4 +36,3 @@ namespace System.ServiceModel.Configuration
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -23,7 +23,6 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
@ -98,4 +97,3 @@ namespace System.ServiceModel.Configuration
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user