using System.ServiceModel.Channels;
using System.Text;
using System.Xml;
-#if !NET_2_1
+#if !MOBILE
using System.Configuration;
using System.ServiceModel.Configuration;
#endif
{
}
- public WebHttpBinding (WebHttpSecurityMode mode)
+ public WebHttpBinding (WebHttpSecurityMode securityMode)
{
- Initialize (mode);
+ Initialize (securityMode);
}
public WebHttpBinding (string configurationName)
{
-#if !NET_2_1
+#if !MOBILE && !XAMMAC_4_5
BindingsSection bindingsSection = ConfigUtil.BindingsSection;
WebHttpBindingElement el = (WebHttpBindingElement) bindingsSection ["webHttpBinding"].ConfiguredBindings.FirstOrDefault (c => c.Name == configurationName);
if (el != null) {
WebHttpSecurity security = new WebHttpSecurity ();
HttpTransportBindingElement t;
// This can be changed only using <synchronousReceive> configuration element.
- bool receive_synchronously;
WebMessageEncodingBindingElement msgenc = new WebMessageEncodingBindingElement ();
public EnvelopeVersion EnvelopeVersion {
get { return EnvelopeVersion.None; }
}
-#if !NET_2_1
-#if NET_4_0
+#if !MOBILE && !XAMMAC_4_5
[DefaultValue (false)]
-#endif
public bool AllowCookies {
get { return t.AllowCookies; }
set { t.AllowCookies = value; }
}
-#if NET_4_0
[DefaultValue (false)]
-#endif
public bool BypassProxyOnLocal {
get { return t.BypassProxyOnLocal; }
set { t.BypassProxyOnLocal = value; }
}
-#if NET_4_0
[MonoTODO]
public bool CrossDomainScriptAccessEnabled { get; set; }
get { return msgenc.ContentTypeMapper; }
set { msgenc.ContentTypeMapper = value; }
}
-#endif
-#if NET_4_0
[DefaultValue (HostNameComparisonMode.StrongWildcard)]
-#endif
public HostNameComparisonMode HostNameComparisonMode {
get { return t.HostNameComparisonMode; }
set { t.HostNameComparisonMode = value; }
}
-#if NET_4_0
[DefaultValue (0x10000)]
-#endif
public long MaxBufferPoolSize {
get { return t.MaxBufferPoolSize; }
set { t.MaxBufferPoolSize = value; }
}
-#if NET_4_0
[DefaultValue (TransferMode.Buffered)]
-#endif
public TransferMode TransferMode {
get { return t.TransferMode; }
set { t.TransferMode = value; }
}
-#if NET_4_0
[DefaultValue (true)]
-#endif
public bool UseDefaultWebProxy {
get { return t.UseDefaultWebProxy; }
set { t.UseDefaultWebProxy = value; }
}
-#if NET_4_0
[DefaultValue (null)]
-#endif
public Uri ProxyAddress {
get { return t.ProxyAddress; }
set { t.ProxyAddress = value; }
}
#endif
-#if NET_4_0
[DefaultValue (0x80000)]
-#endif
public int MaxBufferSize {
get { return t.MaxBufferSize; }
set { t.MaxBufferSize = value; }
}
-#if NET_4_0
[DefaultValue (0x10000)]
-#endif
public long MaxReceivedMessageSize {
get { return t.MaxReceivedMessageSize; }
set { t.MaxReceivedMessageSize = value; }
}
public override string Scheme {
- get { return Security.Mode != WebHttpSecurityMode.None ? Uri.UriSchemeHttps : Uri.UriSchemeHttp; }
+ get { return Security.Mode == WebHttpSecurityMode.Transport ? Uri.UriSchemeHttps : Uri.UriSchemeHttp; }
}
public WebHttpSecurity Security {
get { return security; }
-#if NET_4_0
set {
if (value == null)
throw new ArgumentNullException ("value");
security = value;
}
-#endif
}
public Encoding WriteEncoding {
}
bool IBindingRuntimePreferences.ReceiveSynchronously {
- get { return receive_synchronously; }
+ get { return false; }
}
-#if NET_4_0
[EditorBrowsable (EditorBrowsableState.Advanced)]
public bool ShouldSerializeReaderQuotas ()
{
{
return false;
}
-#endif
}
}