diff options
author | Ludovic Henry <ludovic@xamarin.com> | 2016-08-17 18:40:30 +0300 |
---|---|---|
committer | Ludovic Henry <ludovic@xamarin.com> | 2016-08-18 17:34:36 +0300 |
commit | 249daf43de9c64fefe9f103fc15bb462665b0167 (patch) | |
tree | 9c18ba262b604ee5b6d153444ffdee94eb4ec8c3 /mcs/class/System.ServiceModel | |
parent | 86e6221becd662c7e4f8f5e1284146c66da5c4a1 (diff) |
[mcs] Replace NET_2_1 by MOBILE
NET_2_1 is also defined whenever we define MOBILE, so they have the same effect. Silverlight was 2.1 but it's been dead for a while now, and we do not even support it.
Diffstat (limited to 'mcs/class/System.ServiceModel')
48 files changed, 140 insertions, 140 deletions
diff --git a/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs index c13a103d20a..4f5776d2736 100644 --- a/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs +++ b/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs @@ -54,7 +54,7 @@ using System.Runtime.InteropServices; [assembly: NeutralResourcesLanguage ("en-US")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] -#if NET_2_1 +#if MOBILE [assembly: AssemblyKeyFile ("../winfx.pub")] #else [assembly: AssemblyKeyFile ("../ecma.pub")] @@ -65,11 +65,11 @@ using System.Runtime.InteropServices; [assembly: ComVisible (false)] -#if NET_2_1 +#if MOBILE //[assembly: InternalsVisibleTo ("System.Xml.Serialization, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] #endif -#if !NET_2_1 +#if !MOBILE [assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo ("System.ServiceModel.Routing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo ("System.ServiceModel.Discovery, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] // AnnouncementChannelEndpointElementCollection requires it. diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs index ff8251f1815..f7031432d85 100644 --- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs +++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs @@ -40,7 +40,7 @@ namespace Mono.CodeGeneration AppDomain myDomain = System.Threading.Thread.GetDomain(); AssemblyName myAsmName = new AssemblyName(); myAsmName.Name = name; -#if NET_2_1 +#if MOBILE AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly (myAsmName, AssemblyBuilderAccess.Run); #else AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly (myAsmName, AssemblyBuilderAccess.RunAndSave); diff --git a/mcs/class/System.ServiceModel/Mono.Security.Protocol.Tls/DebugHelper.cs b/mcs/class/System.ServiceModel/Mono.Security.Protocol.Tls/DebugHelper.cs index 70b25bd1d57..ff122878c95 100644 --- a/mcs/class/System.ServiceModel/Mono.Security.Protocol.Tls/DebugHelper.cs +++ b/mcs/class/System.ServiceModel/Mono.Security.Protocol.Tls/DebugHelper.cs @@ -36,7 +36,7 @@ namespace Mono.Security.Protocol.Tls { if (!isInitialized) { -#if !NET_2_1 +#if !MOBILE Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); // Debug.Listeners.Add(new TextWriterTraceListener(@"c:\ssl.log")); Debug.AutoFlush = true; diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs index 32ab72a9cb9..b89e21a5527 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs @@ -94,7 +94,7 @@ namespace System.ServiceModel.Channels return base.BuildChannelFactory<TChannel> (context); } -#if !NET_2_1 +#if !MOBILE public override IChannelListener<TChannel> BuildChannelListener<TChannel> ( BindingContext context) { @@ -131,7 +131,7 @@ namespace System.ServiceModel.Channels return new BinaryMessageEncoderFactory (this); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO] void IWsdlExportExtension.ExportContract (WsdlExporter exporter, WsdlContractConversionContext context) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Binding.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Binding.cs index 12c8ed6af07..9e66babb71a 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Binding.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Binding.cs @@ -133,7 +133,7 @@ namespace System.ServiceModel.Channels return CreateContext (parameters).BuildInnerChannelFactory<TChannel> (); } -#if !NET_2_1 +#if !MOBILE public virtual IChannelListener<TChannel> BuildChannelListener<TChannel> ( Uri listenUriBaseAddress, @@ -267,7 +267,7 @@ namespace System.ServiceModel.Channels return CreateContext (parameters).CanBuildInnerChannelFactory<TChannel> (); } -#if !NET_2_1 +#if !MOBILE public bool CanBuildChannelListener<TChannel> ( params object [] parameters) where TChannel : class, IChannel diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingContext.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingContext.cs index ad0742ce8de..06e682748d3 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingContext.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingContext.cs @@ -149,7 +149,7 @@ namespace System.ServiceModel.Channels return ctx.DequeueBindingElement ().BuildChannelFactory<TChannel> (ctx); } -#if !NET_2_1 +#if !MOBILE public IChannelListener<TChannel> BuildInnerChannelListener<TChannel> () where TChannel : class, IChannel @@ -168,7 +168,7 @@ namespace System.ServiceModel.Channels return ctx.DequeueBindingElement ().CanBuildChannelFactory<TChannel> (ctx); } -#if !NET_2_1 +#if !MOBILE public bool CanBuildInnerChannelListener<TChannel> () where TChannel : class, IChannel { diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElement.cs index d7bd810a4f6..a41eb6ed6de 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElement.cs @@ -52,7 +52,7 @@ namespace System.ServiceModel.Channels return context.BuildInnerChannelFactory<TChannel> (); } -#if !NET_2_1 +#if !MOBILE public virtual IChannelListener<TChannel> BuildChannelListener<TChannel> ( BindingContext context) @@ -70,7 +70,7 @@ namespace System.ServiceModel.Channels return context.CanBuildInnerChannelFactory<TChannel> (); } -#if !NET_2_1 +#if !MOBILE public virtual bool CanBuildChannelListener<TChannel> ( BindingContext context) where TChannel : class, IChannel diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs index 7541ca08a04..3be8fa80569 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs @@ -65,7 +65,7 @@ namespace System.ServiceModel.Channels var f = mbe.CreateMessageEncoderFactory (); var t = typeof (TChannel); if (t == typeof (IRequestSessionChannel) || -#if !NET_2_1 +#if !MOBILE t == typeof (IReplySessionChannel) || #endif t == typeof (IInputSessionChannel) || diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs index 23c8081ebeb..37217165ecf 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs @@ -137,7 +137,7 @@ namespace System.ServiceModel.Channels OperationContext ctx = OperationContext.Current; // FIXME: support more fault code depending on the exception type. -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 // FIXME: set correct fault reason. if (ctx != null && ctx.EndpointDispatcher.ChannelDispatcher.IncludeExceptionDetailInFaults) { ExceptionDetail detail = new ExceptionDetail (error); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs index 19faf78c143..77995b55137 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs @@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels get { return source.MessageEncoder; } } -#if NET_2_1 +#if MOBILE public override T GetProperty<T> () { if (typeof (T) == typeof (IHttpCookieContainerManager)) @@ -189,7 +189,7 @@ namespace System.ServiceModel.Channels suppressEntityBody = true; } -#if !NET_2_1 +#if !MOBILE if (source.ClientCredentials != null) { var cred = source.ClientCredentials; if ((cred.ClientCertificate != null) && (cred.ClientCertificate.Certificate != null)) @@ -476,7 +476,7 @@ namespace System.ServiceModel.Channels // FIXME: Do we need to use the timeout? If so, what happens when the timeout is reached. // Is the current request cancelled and an exception thrown? If so we need to pass the // exception to the Complete () method and allow the result to complete 'normally'. -#if NET_2_1 +#if MOBILE // neither Moonlight nor MonoTouch supports contexts (WaitOne default to false) bool result = AsyncWaitHandle.WaitOne (Timeout); #else diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs index 6b70a26e3b8..191a182dfc7 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs @@ -32,7 +32,7 @@ using System.Net; using System.Net.Security; using System.Security.Authentication.ExtendedProtection; using System.ServiceModel.Channels; -#if !NET_2_1 +#if !MOBILE using System.ServiceModel.Channels.Http; #endif using System.ServiceModel.Description; @@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels return typeof (TChannel) == typeof (IRequestChannel); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public override bool CanBuildChannelListener<TChannel> ( BindingContext context) { @@ -201,7 +201,7 @@ namespace System.ServiceModel.Channels return new HttpChannelFactory<TChannel> (this, context); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 internal static object ListenerBuildLock = new object (); public override IChannelListener<TChannel> BuildChannelListener<TChannel> ( @@ -242,7 +242,7 @@ namespace System.ServiceModel.Channels set { throw new NotImplementedException (); } } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 void IPolicyExportExtension.ExportPolicy ( MetadataExporter exporter, PolicyConversionContext context) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs index d95dd5f35ef..d281d484d86 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs @@ -68,7 +68,7 @@ namespace System.ServiceModel.Channels return base.BuildChannelFactory <TChannel> (context); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO] public override IChannelListener<TChannel> BuildChannelListener<TChannel> ( @@ -83,7 +83,7 @@ namespace System.ServiceModel.Channels return new HttpsTransportBindingElement (this); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public XmlElement GetTransportTokenAssertion () { var doc = new XmlDocument (); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs index ef58f946dff..05fc00512be 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs @@ -33,7 +33,7 @@ namespace System.ServiceModel.Channels [MonoTODO] public sealed class LocalClientSecuritySettings { -#if !NET_2_1 +#if !MOBILE bool cache_cookies = true; int cookie_renewal = 60; bool detect_replays = true; @@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels public TimeSpan ReplayWindow { get; set; } public TimeSpan TimestampValidityDuration { get; set; } -#if !NET_2_1 +#if !MOBILE public bool CacheCookies { get { return cache_cookies; } set { cache_cookies = value; } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageBufferImpl.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageBufferImpl.cs index 4f3d010088a..caebb3a7eba 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageBufferImpl.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageBufferImpl.cs @@ -89,7 +89,7 @@ namespace System.ServiceModel.Channels } } -#if !NET_2_1 +#if !MOBILE internal class XPathMessageBuffer : MessageBuffer { IXPathNavigable source; diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs index 49a8478f6f9..bc3405e5341 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs @@ -59,7 +59,7 @@ namespace System.ServiceModel.Channels return ctx.GetInnerProperty<T> (); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO] protected virtual void OnImportPolicy (XmlElement assertion, MessageVersion messageVersion, diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeader.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeader.cs index 8427b92c569..4e37df9c865 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeader.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeader.cs @@ -209,7 +209,7 @@ namespace System.ServiceModel.Channels { bool is_ref, must_understand, relay; string actor; -#if NET_2_1 +#if MOBILE string body; #else // This is required to completely clone body xml that @@ -238,7 +238,7 @@ namespace System.ServiceModel.Channels local_name = reader.LocalName; namespace_uri = reader.NamespaceURI; -#if NET_2_1 +#if MOBILE body = reader.ReadOuterXml (); #else body = new XmlDocument (); @@ -250,7 +250,7 @@ namespace System.ServiceModel.Channels public XmlReader CreateReader () { -#if NET_2_1 +#if MOBILE var reader = XmlReader.Create (new StringReader (body)); #else var reader = new XmlNodeReader (body); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs index 4060586ca1c..fc4a8e139a1 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs @@ -327,7 +327,7 @@ namespace System.ServiceModel.Channels return; if (MessageVersion.Addressing.Equals (AddressingVersion.WSAddressing10)) Add (MessageHeader.CreateHeader (name, ns, EndpointAddress10.FromEndpointAddress (address))); -#if !NET_2_1 +#if !MOBILE else if (MessageVersion.Addressing.Equals (AddressingVersion.WSAddressingAugust2004)) Add (MessageHeader.CreateHeader (name, ns, EndpointAddressAugust2004.FromEndpointAddress (address))); #endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageProperties.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageProperties.cs index db1c8fd46b7..f46f2ffe2cf 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageProperties.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageProperties.cs @@ -98,7 +98,7 @@ namespace System.ServiceModel.Channels } } -#if !NET_2_1 +#if !MOBILE public SecurityMessageProperty Security { get { return (SecurityMessageProperty) this ["Security"]; } set { this ["Security"] = value; } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReliableSessionBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReliableSessionBindingElement.cs index 422e6e92c1f..1e3bf6cbefb 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReliableSessionBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReliableSessionBindingElement.cs @@ -69,7 +69,7 @@ namespace System.ServiceModel.Channels throw new NotImplementedException (); } -#if !NET_2_1 +#if !MOBILE [MonoTODO] public override IChannelListener<TChannel> BuildChannelListener<TChannel> (BindingContext context) { diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs index 1f47b906c03..ae23b3e3336 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs @@ -30,7 +30,7 @@ using System.Collections.ObjectModel; using System.ServiceModel.Description; using System.ServiceModel.Channels; using System.ServiceModel.Security; -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 using System.ServiceModel.Channels.Security; using System.IdentityModel.Selectors; using System.IdentityModel.Tokens; @@ -46,7 +46,7 @@ namespace System.ServiceModel.Channels { MessageSecurityVersion = MessageSecurityVersion.Default; endpoint = new SupportingTokenParameters (); -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default; KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy; operation = new Dictionary<string,SupportingTokenParameters> (); @@ -63,7 +63,7 @@ namespace System.ServiceModel.Channels security_header_layout = other.security_header_layout; msg_security_version = other.msg_security_version; endpoint = other.endpoint.Clone (); -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 alg_suite = other.alg_suite; key_entropy_mode = other.key_entropy_mode; opt_endpoint = other.opt_endpoint.Clone (); @@ -83,7 +83,7 @@ namespace System.ServiceModel.Channels MessageSecurityVersion msg_security_version; SupportingTokenParameters endpoint; -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 SecurityAlgorithmSuite alg_suite; SecurityKeyEntropyMode key_entropy_mode; SupportingTokenParameters opt_endpoint; @@ -109,7 +109,7 @@ namespace System.ServiceModel.Channels get { return endpoint; } } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public SecurityAlgorithmSuite DefaultAlgorithmSuite { get { return alg_suite; } set { alg_suite = value; } @@ -140,7 +140,7 @@ namespace System.ServiceModel.Channels [MonoTODO ("Implement for TransportSecurityBindingElement")] public override bool CanBuildChannelFactory<TChannel> (BindingContext context) { -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 // not sure this should be like this, but there isn't Symmetric/Asymmetric elements in 2.1 anyways. return context.CanBuildInnerChannelFactory<TChannel> (); #else @@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels protected abstract IChannelFactory<TChannel> BuildChannelFactoryCore<TChannel> (BindingContext context); -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO ("Implement for TransportSecurityBindingElement")] public override bool CanBuildChannelListener<TChannel> (BindingContext context) { @@ -272,7 +272,7 @@ namespace System.ServiceModel.Channels #endif #region Factory methods -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public static SymmetricSecurityBindingElement CreateAnonymousForCertificateBindingElement () { @@ -548,7 +548,7 @@ namespace System.ServiceModel.Channels SecurityBindingElement binding, bool requireCancellation, ChannelProtectionRequirements protectionRequirements) { -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 SymmetricSecurityBindingElement be = new SymmetricSecurityBindingElement (); be.ProtectionTokenParameters = @@ -565,14 +565,14 @@ namespace System.ServiceModel.Channels CreateUserNameOverTransportBindingElement () { var be = new TransportSecurityBindingElement (); -#if !NET_2_1 && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead. +#if !MOBILE && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead. be.EndpointSupportingTokenParameters.SignedEncrypted.Add (new UserNameSecurityTokenParameters ()); #endif return be; } #endregion -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 // It seems almost internal, hardcoded like this (I tried // custom parameters that sets IssuedTokenSecurityTokenParameters // like below ones, but that didn't trigger this method). diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs index 2330e8134c3..2b27840eec5 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs @@ -105,7 +105,7 @@ namespace System.ServiceModel.Channels return base.BuildChannelFactory<TChannel> (context); } -#if !NET_2_1 +#if !MOBILE public override IChannelListener<TChannel> BuildChannelListener<TChannel> ( BindingContext context) { @@ -143,7 +143,7 @@ namespace System.ServiceModel.Channels return new TextMessageEncoderFactory (this); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO] protected override void OnImportPolicy (XmlElement assertion, MessageVersion messageVersion, diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs index bab577c5bae..deb4b4b49f5 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs @@ -81,7 +81,7 @@ namespace System.ServiceModel.Channels q.MaxStringContentLength = (int) MaxReceivedMessageSize; return (T) (object) q; } -#if !NET_2_1 +#if !MOBILE if (typeof (T) == typeof (ChannelProtectionRequirements)) // blank one, basically it should not be used // for any secure channels ( @@ -92,7 +92,7 @@ namespace System.ServiceModel.Channels return context.GetInnerProperty<T> (); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 internal static XmlElement CreateTransportBinding (XmlElement transportToken) { var doc = new XmlDocument (); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs index e29e6f0c554..60ff280d327 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs @@ -36,7 +36,7 @@ using System.ServiceModel.Security.Tokens; namespace System.ServiceModel.Channels { public sealed class TransportSecurityBindingElement -#if NET_2_1 +#if MOBILE : SecurityBindingElement #else : SecurityBindingElement, IPolicyExportExtension @@ -65,7 +65,7 @@ namespace System.ServiceModel.Channels throw new NotImplementedException (); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO] protected override IChannelListener<TChannel> BuildChannelListenerCore<TChannel> ( diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs index c50146bfb3c..4314c221857 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs @@ -31,7 +31,7 @@ using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; using System.ServiceModel.Security; -#if !NET_2_1 +#if !MOBILE using System.IdentityModel.Selectors; using System.IdentityModel.Tokens; using System.ServiceModel.Security.Tokens; @@ -40,7 +40,7 @@ using System.ServiceModel.Security.Tokens; namespace System.ServiceModel.Description { public class ClientCredentials -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 : IEndpointBehavior #else : SecurityCredentialsManager, IEndpointBehavior @@ -58,7 +58,7 @@ namespace System.ServiceModel.Description initiator = source.initiator.Clone (); recipient = source.recipient.Clone (); windows = source.windows.Clone (); -#if !NET_2_1 +#if !MOBILE issued_token = source.issued_token.Clone (); peer = source.peer.Clone (); support_interactive = source.support_interactive; @@ -93,7 +93,7 @@ namespace System.ServiceModel.Description get { return windows; } } -#if !NET_2_1 +#if !MOBILE IssuedTokenClientCredential issued_token = new IssuedTokenClientCredential (); PeerCredential peer = new PeerCredential (); @@ -130,7 +130,7 @@ namespace System.ServiceModel.Description return new ClientCredentials (this); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public override SecurityTokenManager CreateSecurityTokenManager () { return new ClientCredentialsSecurityTokenManager (this); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs index 80238d41ff8..50ea0a90588 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs @@ -373,7 +373,7 @@ namespace System.ServiceModel.Description var fname = a.Name ?? a.DetailType.Name + "Fault"; var fns = a.Namespace ?? cd.Namespace; var fd = new FaultDescription (a.Action ?? cd.Namespace + cd.Name + "/" + od.Name + fname) { DetailType = a.DetailType, Name = fname, Namespace = fns }; -#if !NET_2_1 +#if !MOBILE if (a.HasProtectionLevel) fd.ProtectionLevel = a.ProtectionLevel; #endif @@ -400,7 +400,7 @@ namespace System.ServiceModel.Description foreach (object obj in serviceMethod.GetCustomAttributes (typeof(IOperationBehavior),true)) od.Behaviors.Add ((IOperationBehavior) obj); } -#if !NET_2_1 +#if !MOBILE if (od.Behaviors.Find<OperationBehaviorAttribute>() == null) od.Behaviors.Add (new OperationBehaviorAttribute ()); #endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs index dc25161d460..b763c15ca98 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs @@ -65,13 +65,13 @@ namespace System.ServiceModel.Description public int MaxItemsInObjectGraph { get; set; } -#if !NET_2_1 +#if !MOBILE public IDataContractSurrogate DataContractSurrogate { get; set; } #endif public virtual XmlObjectSerializer CreateSerializer (Type type, string name, string ns, IList<Type> knownTypes) { -#if NET_2_1 +#if MOBILE return new DataContractSerializer (type, name, ns, knownTypes); #else return new DataContractSerializer (type, name, ns, knownTypes, MaxItemsInObjectGraph, IgnoreExtensionDataObject, false, DataContractSurrogate); @@ -80,7 +80,7 @@ namespace System.ServiceModel.Description public virtual XmlObjectSerializer CreateSerializer (Type type, XmlDictionaryString name, XmlDictionaryString ns, IList<Type> knownTypes) { -#if NET_2_1 +#if MOBILE return new DataContractSerializer (type, name, ns, knownTypes); #else return new DataContractSerializer (type, name, ns, knownTypes, MaxItemsInObjectGraph, IgnoreExtensionDataObject, false, DataContractSurrogate); @@ -112,7 +112,7 @@ namespace System.ServiceModel.Description { } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 //IWsdlExportExtension void IWsdlExportExtension.ExportContract (WsdlExporter exporter, diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs index 5e3924b26ee..6dc65cc0d54 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs @@ -100,7 +100,7 @@ namespace System.ServiceModel.Description set { type = value; } } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 internal XsdDataContractImporter DataContractImporter { get; set; } internal XmlSerializerMessageContractImporterInternal XmlSerializationImporter { get; set; } internal System.CodeDom.CodeTypeReference CodeTypeReference { get; set; } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs index 1895c10e759..26ee9d753d8 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs @@ -36,7 +36,7 @@ namespace System.ServiceModel.Description { public class XmlSerializerOperationBehavior : IOperationBehavior -#if !NET_2_1 +#if !MOBILE , IWsdlExportExtension #endif { @@ -104,7 +104,7 @@ namespace System.ServiceModel.Description { } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 void IWsdlExportExtension.ExportContract ( WsdlExporter exporter, WsdlContractConversionContext context) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs index db050b9067f..435b7ef3234 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs @@ -36,7 +36,7 @@ namespace System.ServiceModel.Diagnostics { public MessageLoggingSettings () { -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 var e = ConfigUtil.DiagnosticSection.MessageLogging; LogEntireMessage = e.LogEntireMessage; LogKnownPii = e.LogKnownPii; diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs index db1c49650c1..dd50fedc3ff 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs @@ -243,7 +243,7 @@ namespace System.ServiceModel.Dispatcher var headers = MessageToHeaderObjects (md, message); object [] parts = MessageToParts (md, message); if (md.MessageType != null) { -#if NET_2_1 +#if MOBILE parameters [0] = Activator.CreateInstance (md.MessageType); #else parameters [0] = Activator.CreateInstance (md.MessageType, true); @@ -271,7 +271,7 @@ namespace System.ServiceModel.Dispatcher var headers = MessageToHeaderObjects (md, message); object [] parts = MessageToParts (md, message); if (md.MessageType != null) { -#if NET_2_1 +#if MOBILE object msgObject = Activator.CreateInstance (md.MessageType); #else object msgObject = Activator.CreateInstance (md.MessageType, true); @@ -355,14 +355,14 @@ namespace System.ServiceModel.Dispatcher class DataContractMessagesFormatter : BaseMessagesFormatter { DataContractFormatAttribute attr; -#if !NET_2_1 +#if !MOBILE DataContractSerializerOperationBehavior serializerBehavior; #endif public DataContractMessagesFormatter (OperationDescription desc, DataContractFormatAttribute attr) : base (desc) { -#if !NET_2_1 +#if !MOBILE this.serializerBehavior = desc.Behaviors.Find<DataContractSerializerOperationBehavior>(); #endif this.attr = attr; @@ -442,7 +442,7 @@ namespace System.ServiceModel.Dispatcher XmlObjectSerializer GetSerializer (MessagePartDescription partDesc) { if (!serializers.ContainsKey (partDesc)) -#if !NET_2_1 +#if !MOBILE if (serializerBehavior != null) serializers [partDesc] = serializerBehavior.CreateSerializer( partDesc.Type, partDesc.Name, partDesc.Namespace, OperationKnownTypes as IList<Type>); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs index 3f218beb728..1984a76985c 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs @@ -39,7 +39,7 @@ namespace System.ServiceModel.Dispatcher public sealed class ClientOperation { internal class ClientOperationCollection : -#if NET_2_1 +#if MOBILE KeyedCollection<string, ClientOperation> #else SynchronizedKeyedCollection<string, ClientOperation> diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs index 08f1839c4f7..b23a6ef8345 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs @@ -54,7 +54,7 @@ namespace System.ServiceModel.Dispatcher { contract_name = name; contract_ns = ns; -#if !NET_2_1 +#if !MOBILE CallbackDispatchRuntime = (DispatchRuntime) callbackDispatchRuntime ?? new DispatchRuntime (null, this); #endif } @@ -80,7 +80,7 @@ namespace System.ServiceModel.Dispatcher public Type ContractClientType { get; set; } -#if !NET_2_1 +#if !MOBILE public DispatchRuntime CallbackDispatchRuntime { get; internal set; } #endif @@ -88,7 +88,7 @@ namespace System.ServiceModel.Dispatcher get { return inspectors; } } -#if NET_2_1 +#if MOBILE public KeyedCollection<string,ClientOperation> Operations { get { return operations; } } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs index e9fb67f98e9..0397c9bf3cb 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs @@ -54,7 +54,7 @@ namespace System.ServiceModel.Dispatcher tx_auto_complete, tx_required, auto_dispose_params = true; IDispatchMessageFormatter formatter; -#if !NET_2_1 +#if !MOBILE ImpersonationOption impersonation; IOperationInvoker invoker; SynchronizedCollection<IParameterInspector> inspectors @@ -93,7 +93,7 @@ namespace System.ServiceModel.Dispatcher get { return action; } } -#if !NET_2_1 +#if !MOBILE public SynchronizedCollection<ICallContextInitializer> CallContextInitializers { get { return ctx_initializers; } } @@ -214,7 +214,7 @@ namespace System.ServiceModel.Dispatcher void ThrowIfOpened () { -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 // FIXME: get callback client runtime status when ChannelDispatcher is not available. var state = Parent.ChannelDispatcher != null ? Parent.ChannelDispatcher.State : CommunicationState.Created; // Parent.CallbackClientRuntime.ChannelFactory.State; switch (state) { diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs index f6660e1c19c..8dc605443ef 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Reflection; -#if !NET_2_1 +#if !MOBILE using System.IdentityModel.Policy; #if !XAMMAC_4_5 using System.Web.Security; @@ -45,7 +45,7 @@ namespace System.ServiceModel.Dispatcher { public sealed class DispatchRuntime { -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 internal DispatchRuntime (EndpointDispatcher dispatcher, ClientRuntime callbackClientRuntime) { UnhandledDispatchOperation = new DispatchOperation ( diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs index 3a1da201c8c..c823ce38e95 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs @@ -57,7 +57,7 @@ namespace System.ServiceModel.Security StoreName storeName, X509FindType findType, object findValue) { -#if !NET_2_1 +#if !MOBILE certificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue); #else throw new NotImplementedException (); @@ -68,7 +68,7 @@ namespace System.ServiceModel.Security string subjectName, StoreLocation storeLocation, StoreName storeName) { -#if !NET_2_1 +#if !MOBILE certificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, X509FindType.FindBySubjectName, subjectName); #else throw new NotImplementedException (); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs index c6aa5acfa97..93dc5200545 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs @@ -27,7 +27,7 @@ // using System; using System.Collections.Generic; -#if !NET_2_1 +#if !MOBILE using System.IdentityModel.Selectors; #endif using System.Security.Cryptography.X509Certificates; @@ -49,7 +49,7 @@ namespace System.ServiceModel.Security X509Certificate2 certificate; Dictionary<Uri,X509Certificate2> scoped = new Dictionary<Uri,X509Certificate2> (); -#if !NET_2_1 +#if !MOBILE X509CertificateValidator validator; #endif X509RevocationMode revocation_mode; @@ -92,7 +92,7 @@ namespace System.ServiceModel.Security public void SetDefaultCertificate (StoreLocation storeLocation, StoreName storeName, X509FindType findType, Object findValue) { -#if !NET_2_1 +#if !MOBILE DefaultCertificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue); #else throw new NotImplementedException (); @@ -110,7 +110,7 @@ namespace System.ServiceModel.Security StoreName storeName, X509FindType findType, Object findValue, Uri targetService) { -#if !NET_2_1 +#if !MOBILE ScopedCertificates [targetService] = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue); #else throw new NotImplementedException (); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs index ef9715fb4b4..49140b9f647 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs @@ -50,7 +50,7 @@ namespace System.ServiceModel { } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public BasicHttpBinding (string configurationName) : this () { @@ -110,7 +110,7 @@ namespace System.ServiceModel SecurityBindingElement element; switch (Security.Mode) { case BasicHttpSecurityMode.Message: -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 throw new NotImplementedException (); #else if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate) @@ -121,7 +121,7 @@ namespace System.ServiceModel #endif case BasicHttpSecurityMode.TransportWithMessageCredential: -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 throw new NotImplementedException (); #else if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate) @@ -135,7 +135,7 @@ namespace System.ServiceModel return null; } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 element.SetKeyDerivation (false); element.SecurityHeaderLayout = SecurityHeaderLayout.Lax; #endif @@ -150,7 +150,7 @@ namespace System.ServiceModel ReaderQuotas.CopyTo (tm.ReaderQuotas); return tm; } else { -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 throw new NotImplementedException (); #else return new MtomMessageEncodingBindingElement ( diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs index 21e66a4f65b..b328f91e146 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs @@ -50,7 +50,7 @@ namespace System.ServiceModel { } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public BasicHttpsBinding (string configurationName) : this () { @@ -102,7 +102,7 @@ namespace System.ServiceModel SecurityBindingElement element; switch (Security.Mode) { case BasicHttpsSecurityMode.TransportWithMessageCredential: -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 throw new NotImplementedException (); #else @@ -117,7 +117,7 @@ namespace System.ServiceModel return null; } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 element.SetKeyDerivation (false); element.SecurityHeaderLayout = SecurityHeaderLayout.Lax; #endif @@ -132,7 +132,7 @@ namespace System.ServiceModel ReaderQuotas.CopyTo (tm.ReaderQuotas); return tm; } else { -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 throw new NotImplementedException (); #else return new MtomMessageEncodingBindingElement ( diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs index e5ef83357f3..732a5102299 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs @@ -90,7 +90,7 @@ namespace System.ServiceModel if (endpointConfig == null) return; -#if NET_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 try { // It should automatically use XmlXapResolver var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig")); @@ -160,7 +160,7 @@ namespace System.ServiceModel #endif } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 private void ApplyBehavior (string behaviorConfig) { BehaviorsSection behaviorsSection = ConfigUtil.BehaviorsSection; @@ -260,7 +260,7 @@ namespace System.ServiceModel new BindingParameterCollection (); ContractDescription cd = Endpoint.Contract; -#if !NET_2_1 +#if !MOBILE pl.Add (ChannelProtectionRequirements.CreateFromContract (cd)); #endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs index a7b5587abf8..1e2724f9543 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs @@ -79,7 +79,7 @@ namespace System.ServiceModel string modname = "dummy"; Type crtype = -#if !NET_2_1 +#if !MOBILE duplex ? typeof (DuplexClientRuntimeChannel) : #endif typeof (ClientRuntimeChannel); @@ -131,7 +131,7 @@ namespace System.ServiceModel BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; foreach (OperationDescription od in cd.Operations) { // FIXME: handle properties and events. -#if !NET_2_1 +#if !MOBILE if (od.SyncMethod != null) GenerateMethodImpl (c, crtype.GetMethod ("Process", bf), od.Name, od.SyncMethod); #endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs index 41d75e98f9c..986fb69f1ec 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs @@ -71,7 +71,7 @@ namespace System.ServiceModel { if (CanCastTo<IClientChannel> (t)) return true; -#if !NET_2_1 +#if !MOBILE if (isDuplex && CanCastTo<IDuplexContextChannel> (t)) return true; #endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs index 7c09860e481..737bad6244d 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs @@ -37,7 +37,7 @@ using System.Xml.Schema; using System.Xml.Serialization; using System.ServiceModel.Channels; using System.ServiceModel.Description; -#if !NET_2_1 +#if !MOBILE using System.Security.Cryptography.Xml; #endif @@ -116,7 +116,7 @@ namespace System.ServiceModel get { return address; } } -#if !NET_2_1 +#if !MOBILE internal static XmlSchema Schema { get { if (schema == null) { @@ -187,7 +187,7 @@ namespace System.ServiceModel return ! (address1 == address2); } -//#if !NET_2_1 +//#if !MOBILE public static EndpointAddress ReadFrom ( XmlDictionaryReader reader) { @@ -296,7 +296,7 @@ namespace System.ServiceModel addressingVersion.Namespace, reader.LocalName, reader.NamespaceURI)); reader.MoveToContent (); -#if !NET_2_1 +#if !MOBILE MetadataSet metadata = null; if (reader.LocalName == "Metadata" && reader.NamespaceURI == addressingVersion.Namespace && @@ -317,7 +317,7 @@ namespace System.ServiceModel if (addressingVersion == AddressingVersion.WSAddressing10 && uri == w3c_anonymous) uri = anonymous_role; -#if NET_2_1 +#if MOBILE return new EndpointAddress (uri, identity); #else if (metadata == null) @@ -338,7 +338,7 @@ namespace System.ServiceModel { if (writer == null) throw new ArgumentNullException ("writer"); -#if NET_2_1 +#if MOBILE if (addressingVersion == AddressingVersion.None) { writer.WriteString (Uri.AbsoluteUri); } else { diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs index 862830b0c76..d26293b0e70 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs @@ -42,7 +42,7 @@ namespace System.ServiceModel { [XmlSchemaProvider ("GetSchema")] [XmlRoot ("EndpointReference", Namespace = "http://www.w3.org/2005/08/addressing")] -#if NET_2_1 +#if MOBILE internal class EndpointAddress10 : IXmlSerializable #else public class EndpointAddress10 : IXmlSerializable diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs index 7500d76322c..f56bb33330d 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs @@ -67,7 +67,7 @@ namespace System.ServiceModel set { identity = value; } } -#if !NET_2_1 +#if !MOBILE public XmlDictionaryReader GetReaderAtExtensions () { if (extension == null) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs b/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs index 79c743c48fb..b00afa8203f 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs @@ -50,7 +50,7 @@ namespace System.ServiceModel internal static class Logger { -#if NET_2_1 +#if MOBILE enum TraceEventType // dummy { Critical, @@ -71,7 +71,7 @@ namespace System.ServiceModel static int event_id; static TextWriter log_writer; static XmlWriter xml_writer; -#if !NET_2_1 +#if !MOBILE static readonly TraceSource source = new TraceSource ("System.ServiceModel"); static readonly TraceSource message_source = new TraceSource ("System.ServiceModel.MessageLogging"); #endif @@ -89,7 +89,7 @@ namespace System.ServiceModel case "stderr": log_writer = Console.Error; break; -#if !NET_2_1 +#if !MOBILE default: try { if (!String.IsNullOrEmpty (env)) @@ -104,7 +104,7 @@ namespace System.ServiceModel if (log_writer != null) xml_writer = XmlWriter.Create (log_writer, new XmlWriterSettings () { OmitXmlDeclaration = true }); -#if !NET_2_1 +#if !MOBILE message_source.Switch.Level = SourceLevels.Information; #endif } @@ -143,7 +143,7 @@ namespace System.ServiceModel if (log_writer != null) { lock (log_writer){ event_id++; -#if NET_2_1 +#if MOBILE log_writer.Write ("[{0}] ", event_id); #endif TraceCore (TraceEventType.Information, event_id, @@ -151,7 +151,7 @@ namespace System.ServiceModel message, args); log_writer.WriteLine (message, args); log_writer.Flush (); -#if !NET_2_1 +#if !MOBILE source.TraceEvent (eventType, event_id, message, args); #endif } @@ -179,7 +179,7 @@ namespace System.ServiceModel { if (log_writer != null) { var sw = new StringWriter (); -#if NET_2_1 +#if MOBILE var xw = XmlWriter.Create (sw, xws); #else var doc = new XmlDocument (); @@ -199,7 +199,7 @@ namespace System.ServiceModel event_id++; lock (log_writer){ -#if NET_2_1 +#if MOBILE log_writer.Write ("[{0}] ", event_id); TraceCore (TraceEventType.Information, event_id, /*FIXME*/false, /*FIXME*/Guid.Empty, sw); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/OperationContext.cs b/mcs/class/System.ServiceModel/System.ServiceModel/OperationContext.cs index 097e8cbfa4e..7d64d43d635 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/OperationContext.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/OperationContext.cs @@ -45,7 +45,7 @@ namespace System.ServiceModel } Message incoming_message; -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 EndpointDispatcher dispatcher; #endif IContextChannel channel; @@ -83,7 +83,7 @@ namespace System.ServiceModel } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 public EndpointDispatcher EndpointDispatcher { get { return dispatcher; } set { dispatcher = value; } @@ -146,7 +146,7 @@ namespace System.ServiceModel get { return Channel.SessionId; } } -#if !NET_2_1 +#if !MOBILE public ServiceSecurityContext ServiceSecurityContext { get { return IncomingMessageProperties != null ? IncomingMessageProperties.Security.ServiceSecurityContext : null; } } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/SilverlightClientConfigLoader.cs b/mcs/class/System.ServiceModel/System.ServiceModel/SilverlightClientConfigLoader.cs index 75d412d50c2..eaf7d5ce2c4 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/SilverlightClientConfigLoader.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/SilverlightClientConfigLoader.cs @@ -25,7 +25,7 @@ // 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_2_1 || XAMMAC_4_5 +#if MOBILE || XAMMAC_4_5 using System; using System.Collections.Generic; diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs index 798a77915f1..6f448cb59a3 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs @@ -168,7 +168,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -237,7 +237,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -340,7 +340,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -361,7 +361,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -453,7 +453,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -546,7 +546,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -641,7 +641,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -733,7 +733,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -777,7 +777,7 @@ namespace MonoTests.System.ServiceModel.Channels { // ThrowIfDisposed throws an exception if the state is Closing, Closed or Faulted. [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -843,7 +843,7 @@ namespace MonoTests.System.ServiceModel.Channels { [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -910,7 +910,7 @@ namespace MonoTests.System.ServiceModel.Channels { // ThrowIfDisposedOrImmutable throws an exception if the state is not Created. [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -979,7 +979,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1050,7 +1050,7 @@ namespace MonoTests.System.ServiceModel.Channels { // ThrowIfDisposedOrNotOpen throws an exception if the state is not Opened. [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1119,7 +1119,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1196,7 +1196,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1223,7 +1223,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1239,7 +1239,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1267,7 +1267,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] @@ -1303,7 +1303,7 @@ namespace MonoTests.System.ServiceModel.Channels { } [TestMethod] -#if NET_2_1 +#if MOBILE [MoonlightBug] #else [NUnit.Framework.Ignore] |