Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@ -0,0 +1,21 @@
2010-03-02 Atsushi Enomoto <atsushi@ximian.com>
* EncodingConverter.cs, WebHttpBindingElement.cs,
WebHttpSecurityElement.cs : implement OnApplyConfiguration(), fill
some TypeConverters, and fix BindingElementType, based on the patch
by Sander Rijken.
2009-10-02 Atsushi Enomoto <atsushi@ximian.com>
* WebHttpElement.cs, WebScriptEnablingElement.cs : fix BehavirType.
2008-02-20 Atsushi Enomoto <atsushi@ximian.com>
* WebHttpBindingElement.cs : fix build.
2008-02-16 Atsushi Enomoto <atsushi@ximian.com>
* WebHttpBindingCollectionElement.cs, WebHttpBindingElement.cs,
WebHttpElement.cs, WebHttpSecurityElement.cs,
WebMessageEncodingElement.cs, WebScriptEnablingElement.cs :
new stubs.

View File

@ -0,0 +1,73 @@
//
// WebHttpBindingCollectionElement.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2008 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
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.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public partial class WebHttpBindingCollectionElement
: StandardBindingCollectionElement<WebHttpBinding, WebHttpBindingElement>
{
// Static Fields
static ConfigurationPropertyCollection properties;
static WebHttpBindingCollectionElement ()
{
properties = new ConfigurationPropertyCollection ();
}
public WebHttpBindingCollectionElement ()
{
}
// Methods
protected internal override Binding GetDefault ()
{
return new WebHttpBinding ();
}
}
}

View File

@ -0,0 +1,302 @@
//
// WebHttpBindingElement.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2008 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
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.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public partial class WebHttpBindingElement
: StandardBindingElement, IBindingConfigurationElement
{
// Static Fields
static bool base_merged;
static ConfigurationPropertyCollection properties;
static ConfigurationProperty allow_cookies;
static ConfigurationProperty bypass_proxy_on_local;
static ConfigurationProperty host_name_comparison_mode;
static ConfigurationProperty max_buffer_pool_size;
static ConfigurationProperty max_buffer_size;
static ConfigurationProperty max_received_message_size;
static ConfigurationProperty proxy_address;
static ConfigurationProperty reader_quotas;
static ConfigurationProperty security;
static ConfigurationProperty write_encoding;
static ConfigurationProperty transfer_mode;
static ConfigurationProperty use_default_web_proxy;
static WebHttpBindingElement ()
{
properties = new ConfigurationPropertyCollection ();
allow_cookies = new ConfigurationProperty ("allowCookies",
typeof (bool), "false", new BooleanConverter (), null,
ConfigurationPropertyOptions.None);
bypass_proxy_on_local = new ConfigurationProperty ("bypassProxyOnLocal",
typeof (bool), "false", new BooleanConverter (), null,
ConfigurationPropertyOptions.None);
host_name_comparison_mode = new ConfigurationProperty ("hostNameComparisonMode",
typeof (HostNameComparisonMode), "StrongWildcard", null/* FIXME: get converter for HostNameComparisonMode*/, null,
ConfigurationPropertyOptions.None);
max_buffer_pool_size = new ConfigurationProperty ("maxBufferPoolSize",
typeof (long), "524288", new Int64Converter (), null,
ConfigurationPropertyOptions.None);
max_buffer_size = new ConfigurationProperty ("maxBufferSize",
typeof (int), "65536", new Int32Converter (), null,
ConfigurationPropertyOptions.None);
max_received_message_size = new ConfigurationProperty ("maxReceivedMessageSize",
typeof (long), "65536", new Int64Converter (), null,
ConfigurationPropertyOptions.None);
proxy_address = new ConfigurationProperty ("proxyAddress",
typeof (Uri), null, new UriTypeConverter (), null,
ConfigurationPropertyOptions.None);
reader_quotas = new ConfigurationProperty ("readerQuotas",
typeof (XmlDictionaryReaderQuotasElement), null, null/* FIXME: get converter for XmlDictionaryReaderQuotasElement*/, null,
ConfigurationPropertyOptions.None);
security = new ConfigurationProperty ("security",
typeof (WebHttpSecurityElement), null, null/* FIXME: get converter for WebHttpSecurityElement*/, null,
ConfigurationPropertyOptions.None);
write_encoding = new ConfigurationProperty ("writeEncoding",
typeof (Encoding), "utf-8", new EncodingConverter (), null,
ConfigurationPropertyOptions.None);
transfer_mode = new ConfigurationProperty ("transferMode",
typeof (TransferMode), "Buffered", null/* FIXME: get converter for TransferMode*/, null,
ConfigurationPropertyOptions.None);
use_default_web_proxy = new ConfigurationProperty ("useDefaultWebProxy",
typeof (bool), "true", new BooleanConverter (), null,
ConfigurationPropertyOptions.None);
properties.Add (allow_cookies);
properties.Add (bypass_proxy_on_local);
properties.Add (host_name_comparison_mode);
properties.Add (max_buffer_pool_size);
properties.Add (max_buffer_size);
properties.Add (max_received_message_size);
properties.Add (proxy_address);
properties.Add (reader_quotas);
properties.Add (security);
properties.Add (write_encoding);
properties.Add (transfer_mode);
properties.Add (use_default_web_proxy);
}
public WebHttpBindingElement ()
{
}
public WebHttpBindingElement (string name)
{
this.Name = name;
}
// Properties
[ConfigurationProperty ("allowCookies",
DefaultValue = false,
Options = ConfigurationPropertyOptions.None)]
public bool AllowCookies {
get { return (bool) base [allow_cookies]; }
set { base [allow_cookies] = value; }
}
protected override Type BindingElementType {
get { return typeof (WebHttpBinding); }
}
[ConfigurationProperty ("bypassProxyOnLocal",
DefaultValue = false,
Options = ConfigurationPropertyOptions.None)]
public bool BypassProxyOnLocal {
get { return (bool) base [bypass_proxy_on_local]; }
set { base [bypass_proxy_on_local] = value; }
}
[ConfigurationProperty ("hostNameComparisonMode",
DefaultValue = "StrongWildcard",
Options = ConfigurationPropertyOptions.None)]
public HostNameComparisonMode HostNameComparisonMode {
get { return (HostNameComparisonMode) base [host_name_comparison_mode]; }
set { base [host_name_comparison_mode] = value; }
}
[LongValidator ( MinValue = 0,
MaxValue = 9223372036854775807,
ExcludeRange = false)]
[ConfigurationProperty ("maxBufferPoolSize",
DefaultValue = "524288",
Options = ConfigurationPropertyOptions.None)]
public long MaxBufferPoolSize {
get { return (long) base [max_buffer_pool_size]; }
set { base [max_buffer_pool_size] = value; }
}
[IntegerValidator ( MinValue = 1,
MaxValue = int.MaxValue,
ExcludeRange = false)]
[ConfigurationProperty ("maxBufferSize",
DefaultValue = "65536",
Options = ConfigurationPropertyOptions.None)]
public int MaxBufferSize {
get { return (int) base [max_buffer_size]; }
set { base [max_buffer_size] = value; }
}
[LongValidator ( MinValue = 1,
MaxValue = 9223372036854775807,
ExcludeRange = false)]
[ConfigurationProperty ("maxReceivedMessageSize",
DefaultValue = "65536",
Options = ConfigurationPropertyOptions.None)]
public long MaxReceivedMessageSize {
get { return (long) base [max_received_message_size]; }
set { base [max_received_message_size] = value; }
}
protected override ConfigurationPropertyCollection Properties {
get {
if (!base_merged) {
lock (properties) {
base_merged = true;
foreach (ConfigurationProperty p in base.Properties)
properties.Add (p);
}
}
return properties;
}
}
[ConfigurationProperty ("proxyAddress",
DefaultValue = null,
Options = ConfigurationPropertyOptions.None)]
public Uri ProxyAddress {
get { return (Uri) base [proxy_address]; }
set { base [proxy_address] = value; }
}
[ConfigurationProperty ("readerQuotas",
Options = ConfigurationPropertyOptions.None)]
public XmlDictionaryReaderQuotasElement ReaderQuotas {
get { return (XmlDictionaryReaderQuotasElement) base [reader_quotas]; }
}
[ConfigurationProperty ("security",
Options = ConfigurationPropertyOptions.None)]
public WebHttpSecurityElement Security {
get { return (WebHttpSecurityElement) base [security]; }
}
[TypeConverter ()]
[ConfigurationProperty ("writeEncoding",
DefaultValue = "utf-8",
Options = ConfigurationPropertyOptions.None)]
public Encoding WriteEncoding {
get { return (Encoding) base [write_encoding]; }
set { base [write_encoding] = value; }
}
[ConfigurationProperty ("transferMode",
DefaultValue = "Buffered",
Options = ConfigurationPropertyOptions.None)]
public TransferMode TransferMode {
get { return (TransferMode) base [transfer_mode]; }
set { base [transfer_mode] = value; }
}
[ConfigurationProperty ("useDefaultWebProxy",
DefaultValue = true,
Options = ConfigurationPropertyOptions.None)]
public bool UseDefaultWebProxy {
get { return (bool) base [use_default_web_proxy]; }
set { base [use_default_web_proxy] = value; }
}
protected override void OnApplyConfiguration (Binding binding)
{
WebHttpBinding webBinding = (WebHttpBinding)binding;
webBinding.AllowCookies = AllowCookies;
webBinding.BypassProxyOnLocal = BypassProxyOnLocal;
webBinding.HostNameComparisonMode = HostNameComparisonMode;
webBinding.MaxBufferPoolSize = MaxBufferPoolSize;
webBinding.MaxBufferSize = MaxBufferSize;
webBinding.MaxReceivedMessageSize = MaxReceivedMessageSize;
if(ProxyAddress != null)
webBinding.ProxyAddress = ProxyAddress;
webBinding.TransferMode = TransferMode;
webBinding.UseDefaultWebProxy = UseDefaultWebProxy;
webBinding.WriteEncoding = WriteEncoding;
Security.ApplyConfiguration (webBinding.Security);
}
protected internal override void InitializeFrom (Binding binding)
{
WebHttpBinding b = (WebHttpBinding)binding;
AllowCookies = b.AllowCookies;
BypassProxyOnLocal = b.BypassProxyOnLocal;
HostNameComparisonMode = b.HostNameComparisonMode;
MaxBufferPoolSize = b.MaxBufferPoolSize;
MaxBufferSize = b.MaxBufferSize;
MaxReceivedMessageSize = b.MaxReceivedMessageSize;
if(ProxyAddress != null)
ProxyAddress = b.ProxyAddress;
TransferMode = b.TransferMode;
UseDefaultWebProxy = b.UseDefaultWebProxy;
WriteEncoding = b.WriteEncoding;
Security.InitializeFrom (b.Security);
}
}
}

View File

@ -0,0 +1,80 @@
//
// WebHttpElement.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2008 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
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.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public sealed partial class WebHttpElement
: BehaviorExtensionElement
{
// Static Fields
static ConfigurationPropertyCollection properties;
static ConfigurationProperty behavior_type;
static WebHttpElement ()
{
properties = new ConfigurationPropertyCollection ();
behavior_type = new ConfigurationProperty ("",
typeof (Type), null, new TypeConverter (), null,
ConfigurationPropertyOptions.None);
properties.Add (behavior_type);
}
public WebHttpElement ()
{
}
public override Type BehaviorType {
get { return typeof (WebHttpBehavior); }
}
protected internal override object CreateBehavior ()
{
return new WebHttpBehavior ();
}
}
}

View File

@ -0,0 +1,40 @@
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2010 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// 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;
using System.ServiceModel.Description;
namespace System.ServiceModel.Configuration
{
public class WebHttpEndpointCollectionElement : StandardEndpointCollectionElement<WebHttpEndpoint, WebHttpEndpointElement>
{
}
}
#endif

View File

@ -0,0 +1,206 @@
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2010 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// 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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Configuration;
using System.Reflection;
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.ServiceModel.Web;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public class WebHttpEndpointElement : StandardEndpointElement
{
static ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection ();
static ConfigurationProperty content_type_mapper, cross_domain_script_access_enabled, host_name_comparison_mode, max_buffer_pool_size, max_buffer_size, max_received_message_size, reader_quotas, security, transfer_mode, write_encoding, automatic_format_selection_enabled, default_outgoing_response_format, fault_exception_enabled, help_enabled;
static WebHttpEndpointElement ()
{
content_type_mapper = new ConfigurationProperty ("contentTypeMapper", typeof (string), "", null, null, ConfigurationPropertyOptions.None);
cross_domain_script_access_enabled = new ConfigurationProperty ("crossDomainScriptAccessEnabled", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
host_name_comparison_mode = new ConfigurationProperty ("hostNameComparisonMode", typeof (HostNameComparisonMode), HostNameComparisonMode.StrongWildcard, null, null, ConfigurationPropertyOptions.None);
max_buffer_pool_size = new ConfigurationProperty ("maxBufferPoolSize", typeof (long), 0x80000L, null, null, ConfigurationPropertyOptions.None);
max_buffer_size = new ConfigurationProperty ("maxBufferSize", typeof (int), 0x10000, null, null, ConfigurationPropertyOptions.None);
max_received_message_size = new ConfigurationProperty ("maxReceivedMessageSize", typeof (long), 0x10000L, null, null, ConfigurationPropertyOptions.None);
reader_quotas = new ConfigurationProperty ("readerQuotas", typeof (XmlDictionaryReaderQuotas), null, null, null, ConfigurationPropertyOptions.None);
security = new ConfigurationProperty ("security", typeof (WebHttpSecurity), null, null, null, ConfigurationPropertyOptions.None);
transfer_mode = new ConfigurationProperty ("transferMode", typeof (TransferMode), TransferMode.Buffered, null, null, ConfigurationPropertyOptions.None);
write_encoding = new ConfigurationProperty ("writeEncoding", typeof (Encoding), "utf-8", new EncodingConverter (), null, ConfigurationPropertyOptions.None);
automatic_format_selection_enabled = new ConfigurationProperty ("automaticFormatSelectionEnabled", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
default_outgoing_response_format = new ConfigurationProperty ("defaultOutgoingResponseFormat", typeof (WebMessageFormat), WebMessageFormat.Xml, null, null, ConfigurationPropertyOptions.None);
fault_exception_enabled = new ConfigurationProperty ("faultExceptionEnabled", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
help_enabled = new ConfigurationProperty ("helpEnabled", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
foreach (var item in new ConfigurationProperty [] {content_type_mapper, cross_domain_script_access_enabled, host_name_comparison_mode, max_buffer_pool_size, max_buffer_size, max_received_message_size, reader_quotas, security, transfer_mode, write_encoding, automatic_format_selection_enabled, default_outgoing_response_format, fault_exception_enabled, help_enabled})
properties.Add (item);
}
protected internal override Type EndpointType {
get { return typeof (WebHttpEndpoint); }
}
protected override ConfigurationPropertyCollection Properties {
get { return properties; }
}
[ConfigurationProperty ("contentTypeMapper", DefaultValue = "")]
[StringValidator (MinLength = 0)]
public string ContentTypeMapper {
get { return (string) this ["contentTypeMapper"]; }
set { this ["contentTypeMapper"] = value; }
}
[ConfigurationProperty ("crossDomainScriptAccessEnabled", DefaultValue = false)]
public bool CrossDomainScriptAccessEnabled {
get { return (bool) this ["crossDomainScriptAccessEnabled"]; }
set { this ["crossDomainScriptAccessEnabled"] = value; }
}
[ConfigurationProperty ("hostNameComparisonMode", DefaultValue = HostNameComparisonMode.StrongWildcard)]
public HostNameComparisonMode HostNameComparisonMode {
get { return (HostNameComparisonMode) this ["hostNameComparisonMode"]; }
set { this ["hostNameComparisonMode"] = value; }
}
[LongValidator (MinValue = 0, MaxValue = long.MaxValue, ExcludeRange = false)]
[ConfigurationProperty ("maxBufferPoolSize", DefaultValue = 0x80000,
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 = 0x10000,
Options = ConfigurationPropertyOptions.None)]
public int MaxBufferSize {
get { return (int) this ["maxBufferSize"]; }
set { this ["maxBufferSize"] = value; }
}
[LongValidator ( MinValue = 1, MaxValue = long.MaxValue, ExcludeRange = false)]
[ConfigurationProperty ("maxReceivedMessageSize", DefaultValue = 0x10000,
Options = ConfigurationPropertyOptions.None)]
public long MaxReceivedMessageSize {
get { return (long) this ["maxReceivedMessageSize"]; }
set { this ["maxReceivedMessageSize"] = value; }
}
[ConfigurationProperty ("readerQuotas")]
public XmlDictionaryReaderQuotasElement ReaderQuotas {
get { return (XmlDictionaryReaderQuotasElement) this ["readerQuotas"]; }
}
[ConfigurationProperty ("security")]
public WebHttpSecurityElement Security {
get { return (WebHttpSecurityElement) this ["security"]; }
}
[ConfigurationProperty ("transferMode", DefaultValue = TransferMode.Buffered)]
public TransferMode TransferMode {
get { return (TransferMode) this ["transferMode"]; }
set { this ["transferMode"] = value; }
}
[TypeConverter (typeof (EncodingConverter))]
[ConfigurationProperty ("writeEncoding", DefaultValue = "utf-8")]
public Encoding WriteEncoding {
get { return (Encoding) this ["writeEncoding"]; }
set { this ["writeEncoding"] = value; }
}
[ConfigurationProperty ("automaticFormatSelectionEnabled", DefaultValue = false)]
public bool AutomaticFormatSelectionEnabled {
get { return (bool) this ["automaticFormatSelectionEnabled"]; }
set { this ["automaticFormatSelectionEnabled"] = value; }
}
[ConfigurationProperty ("defaultOutgoingResponseFormat", DefaultValue = WebMessageFormat.Xml)]
public WebMessageFormat DefaultOutgoingResponseFormat {
get { return (WebMessageFormat) this ["defaultOutgoingResponseFormat"]; }
set { this ["defaultOutgoingResponseFormat"] = value; }
}
[ConfigurationProperty ("faultExceptionEnabled", DefaultValue = false)]
public bool FaultExceptionEnabled {
get { return (bool) this ["faultExceptionEnabled"]; }
set { this ["faultExceptionEnabled"] = value; }
}
[ConfigurationProperty ("helpEnabled", DefaultValue = false)]
public bool HelpEnabled {
get { return (bool) this ["helpEnabled"]; }
set { this ["helpEnabled"] = value; }
}
protected internal override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
{
throw new NotImplementedException ();
}
protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
{
throw new NotImplementedException ();
}
protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
{
throw new NotImplementedException ();
}
protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
{
throw new NotImplementedException ();
}
protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
{
throw new NotImplementedException ();
}
}
}
#endif

View File

@ -0,0 +1,111 @@
//
// WebHttpSecurityElement.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2008 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
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.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public sealed partial class WebHttpSecurityElement
: ConfigurationElement
{
// Static Fields
static ConfigurationPropertyCollection properties;
static ConfigurationProperty mode;
static ConfigurationProperty transport;
static WebHttpSecurityElement ()
{
properties = new ConfigurationPropertyCollection ();
mode = new ConfigurationProperty ("mode",
typeof (WebHttpSecurityMode), "None", null/* FIXME: get converter for WebHttpSecurityMode*/, null,
ConfigurationPropertyOptions.None);
transport = new ConfigurationProperty ("transport",
typeof (HttpTransportSecurityElement), null, null/* FIXME: get converter for HttpTransportSecurityElement*/, null,
ConfigurationPropertyOptions.None);
properties.Add (mode);
properties.Add (transport);
}
public WebHttpSecurityElement ()
{
}
// Properties
[ConfigurationProperty ("mode",
DefaultValue = "None",
Options = ConfigurationPropertyOptions.None)]
public WebHttpSecurityMode Mode {
get { return (WebHttpSecurityMode) base [mode]; }
set { base [mode] = value; }
}
protected override ConfigurationPropertyCollection Properties {
get { return properties; }
}
[ConfigurationProperty ("transport",
Options = ConfigurationPropertyOptions.None)]
public HttpTransportSecurityElement Transport {
get { return (HttpTransportSecurityElement) base [transport]; }
}
internal void ApplyConfiguration (WebHttpSecurity security)
{
security.Mode = Mode;
security.Transport.ClientCredentialType = Transport.ClientCredentialType;
}
internal void InitializeFrom (WebHttpSecurity security)
{
Mode = security.Mode;
Transport.ClientCredentialType = security.Transport.ClientCredentialType;
}
}
}

View File

@ -0,0 +1,203 @@
//
// WebMessageEncodingElement.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2008 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
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.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public sealed partial class WebMessageEncodingElement
: BindingElementExtensionElement
{
// Static Fields
static ConfigurationPropertyCollection properties;
static ConfigurationProperty binding_element_type;
static ConfigurationProperty max_read_pool_size;
static ConfigurationProperty max_write_pool_size;
static ConfigurationProperty reader_quotas;
static ConfigurationProperty write_encoding;
static ConfigurationProperty web_content_type_mapper_type;
static WebMessageEncodingElement ()
{
properties = new ConfigurationPropertyCollection ();
binding_element_type = new ConfigurationProperty ("",
typeof (Type), null, new TypeConverter (), null,
ConfigurationPropertyOptions.None);
max_read_pool_size = new ConfigurationProperty ("maxReadPoolSize",
typeof (int), "64", null/* FIXME: get converter for int*/, null,
ConfigurationPropertyOptions.None);
max_write_pool_size = new ConfigurationProperty ("maxWritePoolSize",
typeof (int), "16", null/* FIXME: get converter for int*/, null,
ConfigurationPropertyOptions.None);
reader_quotas = new ConfigurationProperty ("readerQuotas",
typeof (XmlDictionaryReaderQuotasElement), null, null/* FIXME: get converter for XmlDictionaryReaderQuotasElement*/, null,
ConfigurationPropertyOptions.None);
write_encoding = new ConfigurationProperty ("writeEncoding",
typeof (Encoding), "utf-8", null/* FIXME: get converter for Encoding*/, null,
ConfigurationPropertyOptions.None);
web_content_type_mapper_type = new ConfigurationProperty ("",
typeof (string), null, null /* FIXME: supply */, null,
ConfigurationPropertyOptions.None);
properties.Add (binding_element_type);
properties.Add (max_read_pool_size);
properties.Add (max_write_pool_size);
properties.Add (reader_quotas);
properties.Add (write_encoding);
properties.Add (web_content_type_mapper_type);
}
public WebMessageEncodingElement ()
{
}
// Properties
public override Type BindingElementType {
get { return (Type) base [binding_element_type]; }
}
[ConfigurationProperty ("maxReadPoolSize",
Options = ConfigurationPropertyOptions.None,
DefaultValue = "64")]
[IntegerValidator ( MinValue = 1,
MaxValue = int.MaxValue,
ExcludeRange = false)]
public int MaxReadPoolSize {
get { return (int) base [max_read_pool_size]; }
set { base [max_read_pool_size] = value; }
}
[ConfigurationProperty ("maxWritePoolSize",
Options = ConfigurationPropertyOptions.None,
DefaultValue = "16")]
[IntegerValidator ( MinValue = 1,
MaxValue = int.MaxValue,
ExcludeRange = false)]
public int MaxWritePoolSize {
get { return (int) base [max_write_pool_size]; }
set { base [max_write_pool_size] = value; }
}
[ConfigurationProperty ("readerQuotas",
Options = ConfigurationPropertyOptions.None)]
public XmlDictionaryReaderQuotasElement ReaderQuotas {
get { return (XmlDictionaryReaderQuotasElement) base [reader_quotas]; }
}
[ConfigurationProperty ("writeEncoding",
Options = ConfigurationPropertyOptions.None,
DefaultValue = "utf-8")]
[TypeConverter ()]
public Encoding WriteEncoding {
get { return (Encoding) base [write_encoding]; }
set { base [write_encoding] = value; }
}
[ConfigurationProperty ("webContentTypeMapperType",
Options = ConfigurationPropertyOptions.None,
DefaultValue = "")]
[StringValidator ( MinLength = 0,
MaxLength = int.MaxValue)]
public string WebContentTypeMapperType {
get { return (string) base [web_content_type_mapper_type]; }
set { base [web_content_type_mapper_type] = value; }
}
protected internal override BindingElement CreateBindingElement ()
{
var be = new WebMessageEncodingBindingElement ();
ApplyConfiguration (be);
return be;
}
public override void ApplyConfiguration (BindingElement bindingElement)
{
base.ApplyConfiguration (bindingElement);
var b = (WebMessageEncodingBindingElement) bindingElement;
b.ContentTypeMapper = (WebContentTypeMapper) Activator.CreateInstance (Type.GetType (WebContentTypeMapperType), true);
b.MaxReadPoolSize = MaxReadPoolSize;
b.MaxWritePoolSize = MaxWritePoolSize;
b.WriteEncoding = WriteEncoding;
ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
}
public override void CopyFrom (ServiceModelExtensionElement from)
{
base.CopyFrom (from);
var c = (WebMessageEncodingElement) from;
MaxReadPoolSize = c.MaxReadPoolSize;
MaxWritePoolSize = c.MaxWritePoolSize;
ReaderQuotas.CopyFrom (c.ReaderQuotas);
WriteEncoding = c.WriteEncoding;
}
}
static class Extensions
{
public static void ApplyConfiguration (this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotas q)
{
q.MaxArrayLength = e.MaxArrayLength;
q.MaxBytesPerRead = e.MaxBytesPerRead;
q.MaxDepth = e.MaxDepth;
q.MaxNameTableCharCount = e.MaxNameTableCharCount;
q.MaxStringContentLength = e.MaxStringContentLength;
}
public static void CopyFrom (this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotasElement o)
{
e.MaxArrayLength = o.MaxArrayLength;
e.MaxBytesPerRead = o.MaxBytesPerRead;
e.MaxDepth = o.MaxDepth;
e.MaxNameTableCharCount = o.MaxNameTableCharCount;
e.MaxStringContentLength = o.MaxStringContentLength;
}
}
}

View File

@ -0,0 +1,82 @@
//
// WebScriptEnablingElement.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2008 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
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.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Diagnostics;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public sealed partial class WebScriptEnablingElement
: BehaviorExtensionElement
{
// Static Fields
static ConfigurationPropertyCollection properties;
static ConfigurationProperty behavior_type;
static WebScriptEnablingElement ()
{
properties = new ConfigurationPropertyCollection ();
behavior_type = new ConfigurationProperty ("",
typeof (Type), null, new TypeConverter (), null,
ConfigurationPropertyOptions.None);
properties.Add (behavior_type);
}
public WebScriptEnablingElement ()
{
}
// Properties
public override Type BehaviorType {
get { return typeof (WebScriptEnablingBehavior); }
}
protected internal override object CreateBehavior ()
{
return new WebScriptEnablingBehavior ();
}
}
}

View File

@ -0,0 +1,40 @@
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2010 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// 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;
using System.ServiceModel.Description;
namespace System.ServiceModel.Configuration
{
public class WebScriptEndpointCollectionElement : StandardEndpointCollectionElement<WebScriptEndpoint, WebScriptEndpointElement>
{
}
}
#endif

View File

@ -0,0 +1,176 @@
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2010 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// 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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Configuration;
using System.Reflection;
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.ServiceModel.Web;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
public class WebScriptEndpointElement : StandardEndpointElement
{
static ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection ();
static ConfigurationProperty content_type_mapper, cross_domain_script_access_enabled, host_name_comparison_mode, max_buffer_pool_size, max_buffer_size, max_received_message_size, reader_quotas, security, transfer_mode, write_encoding;
static WebScriptEndpointElement ()
{
content_type_mapper = new ConfigurationProperty ("contentTypeMapper", typeof (string), "", null, null, ConfigurationPropertyOptions.None);
cross_domain_script_access_enabled = new ConfigurationProperty ("crossDomainScriptAccessEnabled", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
host_name_comparison_mode = new ConfigurationProperty ("hostNameComparisonMode", typeof (HostNameComparisonMode), HostNameComparisonMode.StrongWildcard, null, null, ConfigurationPropertyOptions.None);
max_buffer_pool_size = new ConfigurationProperty ("maxBufferPoolSize", typeof (long), 0x80000, null, null, ConfigurationPropertyOptions.None);
max_buffer_size = new ConfigurationProperty ("maxBufferSize", typeof (int), 0x10000, null, null, ConfigurationPropertyOptions.None);
max_received_message_size = new ConfigurationProperty ("maxReceivedMessageSize", typeof (long), 0x10000, null, null, ConfigurationPropertyOptions.None);
reader_quotas = new ConfigurationProperty ("readerQuotas", typeof (XmlDictionaryReaderQuotas), null, null, null, ConfigurationPropertyOptions.None);
security = new ConfigurationProperty ("security", typeof (WebHttpSecurity), null, null, null, ConfigurationPropertyOptions.None);
transfer_mode = new ConfigurationProperty ("transferMode", typeof (TransferMode), TransferMode.Buffered, null, null, ConfigurationPropertyOptions.None);
write_encoding = new ConfigurationProperty ("writeEncoding", typeof (Encoding), "utf-8", new EncodingConverter (), null, ConfigurationPropertyOptions.None);
foreach (var item in new ConfigurationProperty [] {content_type_mapper, cross_domain_script_access_enabled, host_name_comparison_mode, max_buffer_pool_size, max_buffer_size, max_received_message_size, reader_quotas, security, transfer_mode, write_encoding})
properties.Add (item);
}
protected internal override Type EndpointType {
get { return typeof (WebScriptEndpoint); }
}
protected override ConfigurationPropertyCollection Properties {
get { return properties; }
}
[ConfigurationProperty ("contentTypeMapper", DefaultValue = "")]
[StringValidator (MinLength = 0)]
public string ContentTypeMapper {
get { return (string) this ["contentTypeMapper"]; }
set { this ["contentTypeMapper"] = value; }
}
[ConfigurationProperty ("crossDomainScriptAccessEnabled", DefaultValue = false)]
public bool CrossDomainScriptAccessEnabled {
get { return (bool) this ["crossDomainScriptAccessEnabled"]; }
set { this ["crossDomainScriptAccessEnabled"] = value; }
}
[ConfigurationProperty ("hostNameComparisonMode", DefaultValue = HostNameComparisonMode.StrongWildcard)]
public HostNameComparisonMode HostNameComparisonMode {
get { return (HostNameComparisonMode) this ["hostNameComparisonMode"]; }
set { this ["hostNameComparisonMode"] = value; }
}
[LongValidator (MinValue = 0, MaxValue = long.MaxValue, ExcludeRange = false)]
[ConfigurationProperty ("maxBufferPoolSize", DefaultValue = 0x80000,
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 = 0x10000,
Options = ConfigurationPropertyOptions.None)]
public int MaxBufferSize {
get { return (int) this ["maxBufferSize"]; }
set { this ["maxBufferSize"] = value; }
}
[LongValidator ( MinValue = 1, MaxValue = long.MaxValue, ExcludeRange = false)]
[ConfigurationProperty ("maxReceivedMessageSize", DefaultValue = 0x10000,
Options = ConfigurationPropertyOptions.None)]
public long MaxReceivedMessageSize {
get { return (long) this ["maxReceivedMessageSize"]; }
set { this ["maxReceivedMessageSize"] = value; }
}
[ConfigurationProperty ("readerQuotas")]
public XmlDictionaryReaderQuotasElement ReaderQuotas {
get { return (XmlDictionaryReaderQuotasElement) this ["readerQuotas"]; }
}
[ConfigurationProperty ("security")]
public WebHttpSecurityElement Security {
get { return (WebHttpSecurityElement) this ["security"]; }
}
[ConfigurationProperty ("transferMode", DefaultValue = TransferMode.Buffered)]
public TransferMode TransferMode {
get { return (TransferMode) this ["transferMode"]; }
set { this ["transferMode"] = value; }
}
[TypeConverter (typeof (EncodingConverter))]
[ConfigurationProperty ("writeEncoding", DefaultValue = "utf-8")]
public Encoding WriteEncoding {
get { return (Encoding) this ["writeEncoding"]; }
set { this ["writeEncoding"] = value; }
}
protected internal override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
{
throw new NotImplementedException ();
}
protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
{
throw new NotImplementedException ();
}
protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
{
throw new NotImplementedException ();
}
protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
{
throw new NotImplementedException ();
}
protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
{
throw new NotImplementedException ();
}
}
}
#endif