Ver código fonte

[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.
Ludovic Henry 9 anos atrás
pai
commit
249daf43de
100 arquivos alterados com 188 adições e 188 exclusões
  1. 1 1
      mcs/build/common/AssemblyRef.cs
  2. 2 2
      mcs/build/common/Consts.cs.in
  3. 1 1
      mcs/class/Mono.Security/Assembly/AssemblyInfo.cs
  4. 1 1
      mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs
  5. 3 3
      mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs
  6. 1 1
      mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs
  7. 1 1
      mcs/class/System.Core/Assembly/AssemblyInfo.cs
  8. 1 1
      mcs/class/System.Core/System.Security.Cryptography/AesTransform.cs
  9. 1 1
      mcs/class/System.Core/System.Security.Cryptography/MD5Cng.cs
  10. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA1Cng.cs
  11. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA256Cng.cs
  12. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA256CryptoServiceProvider.cs
  13. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA384Cng.cs
  14. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA384CryptoServiceProvider.cs
  15. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA512Cng.cs
  16. 1 1
      mcs/class/System.Core/System.Security.Cryptography/SHA512CryptoServiceProvider.cs
  17. 1 1
      mcs/class/System.Core/tools/hashwrap.cs
  18. 1 1
      mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs
  19. 1 1
      mcs/class/System.Net/Assembly/AssemblyInfo.cs
  20. 1 1
      mcs/class/System.Net/System.Net.NetworkInformation/NetworkChange_2_1.cs
  21. 1 1
      mcs/class/System.Net/System.Net.NetworkInformation/NetworkInterface_2_1.cs
  22. 1 1
      mcs/class/System.Net/System.Net.Policy/BaseDomainPolicy.cs
  23. 1 1
      mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs
  24. 1 1
      mcs/class/System.Net/System.Net.Policy/ClientAccessPolicyParser.cs
  25. 1 1
      mcs/class/System.Net/System.Net.Policy/CrossDomainPolicyManager.cs
  26. 1 1
      mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicy.cs
  27. 1 1
      mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicyParser.cs
  28. 1 1
      mcs/class/System.Net/System.Net.Policy/ICrossDomainPolicy.cs
  29. 1 1
      mcs/class/System.Net/System.Net.Policy/NoAccessPolicy.cs
  30. 1 1
      mcs/class/System.Net/System.Net.Policy/PolicyDownloadPolicy.cs
  31. 1 1
      mcs/class/System.Net/System.Net.Policy/SiteOfOriginPolicy.cs
  32. 1 1
      mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs
  33. 1 1
      mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs
  34. 1 1
      mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs
  35. 1 1
      mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs
  36. 1 1
      mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs
  37. 1 1
      mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs
  38. 1 1
      mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs
  39. 1 1
      mcs/class/System.Net/System.Net/HttpWebResponse_2_1.cs
  40. 1 1
      mcs/class/System.Net/System.Net/WebExceptionStatus_2_1.cs
  41. 1 1
      mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs
  42. 1 1
      mcs/class/System.Net/System.Net/WebRequest_2_1.cs
  43. 1 1
      mcs/class/System.Net/System.Net/WebResponse_2_1.cs
  44. 1 1
      mcs/class/System.Net/System.Net/WriteStreamClosedEventArgs_2_1.cs
  45. 1 1
      mcs/class/System.Net/System.Net/WriteStreamClosedEventHandler_2_1.cs
  46. 1 1
      mcs/class/System.Runtime.DurableInstancing/Assembly/AssemblyInfo.cs
  47. 1 1
      mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
  48. 1 1
      mcs/class/System.ServiceModel.Discovery/Assembly/AssemblyInfo.cs
  49. 1 1
      mcs/class/System.ServiceModel.Internals/Assembly/AssemblyInfo.cs
  50. 1 1
      mcs/class/System.ServiceModel.Routing/Assembly/AssemblyInfo.cs
  51. 1 1
      mcs/class/System.ServiceModel.Syndication/Assembly/AssemblyInfo.cs
  52. 1 1
      mcs/class/System.ServiceModel.Web.Extensions/Assembly/AssemblyInfo.cs
  53. 2 2
      mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
  54. 3 3
      mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs
  55. 3 3
      mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs
  56. 6 6
      mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
  57. 9 9
      mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
  58. 2 2
      mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs
  59. 6 6
      mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs
  60. 3 3
      mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
  61. 1 1
      mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
  62. 3 3
      mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
  63. 1 1
      mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs
  64. 1 1
      mcs/class/System.ServiceModel/Mono.Security.Protocol.Tls/DebugHelper.cs
  65. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
  66. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/Binding.cs
  67. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingContext.cs
  68. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElement.cs
  69. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs
  70. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs
  71. 3 3
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
  72. 4 4
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
  73. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs
  74. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs
  75. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageBufferImpl.cs
  76. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
  77. 3 3
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeader.cs
  78. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs
  79. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageProperties.cs
  80. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReliableSessionBindingElement.cs
  81. 11 11
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
  82. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
  83. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
  84. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs
  85. 5 5
      mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
  86. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs
  87. 4 4
      mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
  88. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
  89. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs
  90. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs
  91. 5 5
      mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs
  92. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
  93. 3 3
      mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
  94. 3 3
      mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
  95. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs
  96. 2 2
      mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs
  97. 4 4
      mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs
  98. 5 5
      mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs
  99. 4 4
      mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
  100. 3 3
      mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs

+ 1 - 1
mcs/build/common/AssemblyRef.cs

@@ -5,7 +5,7 @@ static class AssemblyRef
 	internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
 
 	public const string EcmaPublicKey = "b77a5c561934e089";
-#if NET_2_1
+#if MOBILE
 	public const string FrameworkPublicKeyFull = "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9";
 	public const string FrameworkPublicKeyFull2 = "00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB";
 #else

+ 2 - 2
mcs/build/common/Consts.cs.in

@@ -39,7 +39,7 @@ static class Consts
 	public const string MonoProduct = "Mono Common Language Infrastructure";
 	public const string MonoCopyright = "(c) Various Mono authors";
 
-#if NET_2_1
+#if MOBILE
 	// Versions of .NET Framework for Silverlight 4.0
 	public const string FxVersion = "2.0.5.0";
 	public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
@@ -118,7 +118,7 @@ static class Consts
 	public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
 	public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
 	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
-#elif NET_2_1
+#elif MOBILE
 	public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
 #endif
 }

+ 1 - 1
mcs/class/Mono.Security/Assembly/AssemblyInfo.cs

@@ -60,7 +60,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyDelaySign (true)]
 [assembly: AssemblyKeyFile ("../mono.pub")]
 
-#if NET_2_1
+#if MOBILE
 [assembly: InternalsVisibleTo ("System, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
 #else
 [assembly: InternalsVisibleTo ("System, PublicKey=00000000000000000400000000000000")]

+ 1 - 1
mcs/class/Mono.Security/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;

+ 3 - 3
mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs

@@ -148,7 +148,7 @@ namespace Mono.Security.X509 {
 					ClearCertificates ();	// We have modified the store on disk.  So forget the old state.
 				}
 			}
-#if !NET_2_1
+#if !MOBILE
 			// Try to save privateKey if available..
 			CspParameters cspParams = new CspParameters ();
 			cspParams.KeyContainerName = CryptoConvert.ToHex (certificate.Hash);
@@ -279,7 +279,7 @@ namespace Mono.Security.X509 {
 		{
 			byte[] data = Load (filename);
 			X509Certificate cert = new X509Certificate (data);
-#if !NET_2_1
+#if !MOBILE
 			// If privateKey it's available, load it too..
 			CspParameters cspParams = new CspParameters ();
 			cspParams.KeyContainerName = CryptoConvert.ToHex (cert.Hash);
@@ -371,7 +371,7 @@ namespace Mono.Security.X509 {
 			}
 			return list;
 		}
-#if !NET_2_1
+#if !MOBILE
 		private void ImportPrivateKey (X509Certificate certificate, CspParameters cspParams)
 		{
 			RSACryptoServiceProvider rsaCsp = certificate.RSA as RSACryptoServiceProvider;

+ 1 - 1
mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs

@@ -40,7 +40,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")]

+ 1 - 1
mcs/class/System.Core/Assembly/AssemblyInfo.cs

@@ -52,7 +52,7 @@ using System.Runtime.InteropServices;
 [assembly: NeutralResourcesLanguage ("en-US")]
 [assembly: CLSCompliant (true)]
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
 	// attributes specific to FX 3.5
 	[assembly: AssemblyKeyFile ("../silverlight.pub")]
 #else

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/AesTransform.cs

@@ -99,7 +99,7 @@ namespace System.Security.Cryptography {
 				exKey [i] = exKey [i-Nk] ^ temp;
 			}
 
-#if NET_2_1
+#if MOBILE
 			// Silverlight 2.0 only supports CBC
 			if (!encryption) {
 #else

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/MD5Cng.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA1Cng.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA256Cng.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA256CryptoServiceProvider.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA384Cng.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA384CryptoServiceProvider.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA512Cng.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/SHA512CryptoServiceProvider.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.Core/tools/hashwrap.cs

@@ -62,7 +62,7 @@ class Program {
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOBILE
 
 namespace System.Security.Cryptography {
 

+ 1 - 1
mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs

@@ -61,6 +61,6 @@ using System.Runtime.InteropServices;
 [assembly: ComCompatibleVersion (1, 0, 3300, 0)]
 [assembly: AllowPartiallyTrustedCallers]
 
-#if !NET_2_1
+#if !MOBILE
 [assembly: SecurityCritical (SecurityCriticalScope.Explicit)]
 #endif

+ 1 - 1
mcs/class/System.Net/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 ("../silverlight.pub")]
 	[assembly: InternalsVisibleTo ("System.Windows, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
 	[assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]

+ 1 - 1
mcs/class/System.Net/System.Net.NetworkInformation/NetworkChange_2_1.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
+#if MOBILE
 using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {

+ 1 - 1
mcs/class/System.Net/System.Net.NetworkInformation/NetworkInterface_2_1.cs

@@ -30,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.NetworkInformation {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/BaseDomainPolicy.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/ClientAccessPolicyParser.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/CrossDomainPolicyManager.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicy.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicyParser.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/ICrossDomainPolicy.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Policy {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/NoAccessPolicy.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System.Security;
 

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/PolicyDownloadPolicy.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Policy {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Policy/SiteOfOriginPolicy.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Policy {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs

@@ -20,7 +20,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Sockets {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs

@@ -20,7 +20,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Sockets {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 namespace System.Net.Sockets {
 	public enum SocketAsyncOperation {
 		None,

+ 1 - 1
mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs

@@ -20,7 +20,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Sockets {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Sockets {
 

+ 1 - 1
mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net.Sockets {
 

+ 1 - 1
mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System.IO;
 

+ 1 - 1
mcs/class/System.Net/System.Net/HttpWebResponse_2_1.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net {
 

+ 1 - 1
mcs/class/System.Net/System.Net/WebExceptionStatus_2_1.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net {
 	public enum WebExceptionStatus {

+ 1 - 1
mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs

@@ -33,7 +33,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System;
 using System.Collections;

+ 1 - 1
mcs/class/System.Net/System.Net/WebRequest_2_1.cs

@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System.Collections.Generic;
 using System.IO;

+ 1 - 1
mcs/class/System.Net/System.Net/WebResponse_2_1.cs

@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System.IO;
 

+ 1 - 1
mcs/class/System.Net/System.Net/WriteStreamClosedEventArgs_2_1.cs

@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 using System.ComponentModel;
 using System.IO;

+ 1 - 1
mcs/class/System.Net/System.Net/WriteStreamClosedEventHandler_2_1.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if MOBILE
 
 namespace System.Net
 {

+ 1 - 1
mcs/class/System.Runtime.DurableInstancing/Assembly/AssemblyInfo.cs

@@ -55,7 +55,7 @@ using System.Runtime.InteropServices;
 [assembly: NeutralResourcesLanguage ("en-US")]
 [assembly: CLSCompliant (true)]
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
 [assembly: AssemblyKeyFile ("../silverlight.pub")]
 #else
 [assembly: AssemblyKeyFile ("../winfx.pub")]

+ 1 - 1
mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs

@@ -55,7 +55,7 @@ using System.Runtime.InteropServices;
 [assembly: NeutralResourcesLanguage ("en-US")]
 [assembly: CLSCompliant (true)]
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
 [assembly: AssemblyKeyFile ("../silverlight.pub")]
 #else
 [assembly: AssemblyKeyFile ("../ecma.pub")]

+ 1 - 1
mcs/class/System.ServiceModel.Discovery/Assembly/AssemblyInfo.cs

@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
 [assembly: ComVisible (false)]
 
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
 [assembly: AssemblyKeyFile ("../silverlight.pub")]
 #else
 [assembly: AssemblyKeyFile("../winfx.pub")]

+ 1 - 1
mcs/class/System.ServiceModel.Internals/Assembly/AssemblyInfo.cs

@@ -40,7 +40,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")]

+ 1 - 1
mcs/class/System.ServiceModel.Routing/Assembly/AssemblyInfo.cs

@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
 [assembly: ComVisible (false)]
 
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
 [assembly: AssemblyKeyFile ("../silverlight.pub")]
 #else
 [assembly: AssemblyKeyFile("../winfx.pub")]

+ 1 - 1
mcs/class/System.ServiceModel.Syndication/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 ("../silverlight.pub")]
 #else
 [assembly: AssemblyKeyFile ("../ecma.pub")]

+ 1 - 1
mcs/class/System.ServiceModel.Web.Extensions/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 ("../silverlight.pub")]
 #else
 [assembly: AssemblyKeyFile ("../silverlight.pub")] // easing InternalVisibleTo use.

+ 2 - 2
mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs

@@ -53,7 +53,7 @@ using System.Runtime.InteropServices;
 [assembly: ComVisible (false)]
 
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
 [assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
 [assembly: AssemblyKeyFile ("../silverlight.pub")]
 #else
@@ -61,7 +61,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyKeyFile("../winfx.pub")]
 #endif
 
-#if NET_2_1
+#if MOBILE
 [assembly: InternalsVisibleTo ("System.Json, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
 [assembly: InternalsVisibleTo ("System.ServiceModel.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
 [assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]

+ 3 - 3
mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs

@@ -47,7 +47,7 @@ namespace System.ServiceModel.Channels
 		}
 
 		public override string ContentType {
-#if NET_2_1
+#if MOBILE
 			get { return MediaType; }
 #else
 			get { return MediaType + "; charset=" + source.WriteEncoding.HeaderName; }
@@ -114,7 +114,7 @@ namespace System.ServiceModel.Channels
 				break;
 			case WebContentFormat.Json:
 				// FIXME: is it safe/unsafe/required to keep XmlReader open?
-#if NET_2_1
+#if MOBILE
 				msg = Message.CreateMessage (MessageVersion.None, null, JsonReaderWriterFactory.CreateJsonReader (stream, source.ReaderQuotas));
 #else
 				msg = Message.CreateMessage (MessageVersion.None, null, JsonReaderWriterFactory.CreateJsonReader (stream, enc, source.ReaderQuotas, null));
@@ -174,7 +174,7 @@ namespace System.ServiceModel.Channels
 
 			switch (GetContentFormat (message)) {
 			case WebContentFormat.Xml:
-#if NET_2_1
+#if MOBILE
 				using (XmlWriter w = XmlDictionaryWriter.CreateDictionaryWriter (XmlWriter.Create (new StreamWriter (stream, source.WriteEncoding))))
 					message.WriteMessage (w);
 #else

+ 3 - 3
mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs

@@ -34,7 +34,7 @@ using System.Xml;
 namespace System.ServiceModel.Channels
 {
 	public sealed class WebMessageEncodingBindingElement
-#if NET_2_1
+#if MOBILE
 		: MessageEncodingBindingElement
 #else
 		: MessageEncodingBindingElement, IWsdlExportExtension
@@ -109,7 +109,7 @@ namespace System.ServiceModel.Channels
 			return base.BuildChannelFactory<TChannel> (context);
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		[MonoTODO ("Why is it overriden?")]
 		public override bool CanBuildChannelListener<TChannel> (BindingContext context)
 		{
@@ -146,7 +146,7 @@ namespace System.ServiceModel.Channels
 			return context.GetInnerProperty<T> ();
 		}
 
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
 		[MonoTODO]
 		void IWsdlExportExtension.ExportContract (WsdlExporter exporter, WsdlContractConversionContext context)
 		{

+ 6 - 6
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs

@@ -84,7 +84,7 @@ namespace System.ServiceModel.Description
 			// clientRuntime.MessageInspectors.Add (something);
 		}
 
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
 		protected virtual void AddServerErrorHandlers (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
 		{
 			endpointDispatcher.ChannelDispatcher.ErrorHandlers.Add (new WebHttpErrorHandler ());
@@ -103,7 +103,7 @@ namespace System.ServiceModel.Description
 
 		public virtual void ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
 		{
-#if NET_2_1 || XAMMAC_4_5
+#if MOBILE || XAMMAC_4_5
 			throw new NotImplementedException ();
 #else
 			endpointDispatcher.DispatchRuntime.OperationSelector = GetOperationSelector (endpoint);
@@ -146,7 +146,7 @@ namespace System.ServiceModel.Description
 			}
 		}
 
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
 		internal class DispatchPairFormatter : IDispatchMessageFormatter
 		{
 			public DispatchPairFormatter (IDispatchMessageFormatter request, IDispatchMessageFormatter reply)
@@ -185,7 +185,7 @@ namespace System.ServiceModel.Description
 			return new WebMessageFormatter.ReplyClientFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		protected virtual IDispatchMessageFormatter GetReplyDispatchFormatter (OperationDescription operationDescription, ServiceEndpoint endpoint)
 		{
 			return new WebMessageFormatter.ReplyDispatchFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
@@ -197,7 +197,7 @@ namespace System.ServiceModel.Description
 			return new WebMessageFormatter.RequestClientFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		protected virtual IDispatchMessageFormatter GetRequestDispatchFormatter (OperationDescription operationDescription, ServiceEndpoint endpoint)
 		{
 			return new WebMessageFormatter.RequestDispatchFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
@@ -287,7 +287,7 @@ namespace System.ServiceModel.Description
 				throw new InvalidOperationException ("ManualAddressing in the transport binding element in the binding must be true for WebHttpBehavior");
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		internal class WebHttpErrorHandler : IErrorHandler
 		{
 			public void ProvideFault (Exception error, MessageVersion version, ref Message fault)

+ 9 - 9
mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs

@@ -41,7 +41,7 @@ using System.ServiceModel.Web;
 using System.Text;
 using System.Xml;
 
-#if NET_2_1
+#if MOBILE
 using XmlObjectSerializer = System.Object;
 #endif
 
@@ -81,7 +81,7 @@ namespace System.ServiceModel.Dispatcher
 			this.converter = converter;
 			this.behavior = behavior;
 			ApplyWebAttribute ();
-#if !NET_2_1
+#if !MOBILE
 			// This is a hack for WebScriptEnablingBehavior
 			var jqc = converter as JsonQueryStringConverter;
 			if (jqc != null)
@@ -248,7 +248,7 @@ namespace System.ServiceModel.Dispatcher
 		
 		protected object ReadObjectBody (XmlObjectSerializer serializer, XmlReader reader)
 		{
-#if NET_2_1
+#if MOBILE
 			return (serializer is DataContractJsonSerializer) ?
 				((DataContractJsonSerializer) serializer).ReadObject (reader) :
 				((DataContractSerializer) serializer).ReadObject (reader, true);
@@ -283,7 +283,7 @@ namespace System.ServiceModel.Dispatcher
 			}
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		internal class RequestDispatchFormatter : WebDispatchMessageFormatter
 		{
 			public RequestDispatchFormatter (OperationDescription operation, ServiceEndpoint endpoint, QueryStringConverter converter, WebHttpBehavior behavior)
@@ -363,7 +363,7 @@ namespace System.ServiceModel.Dispatcher
 				// FIXME: get encoding from somewhere
 				hp.Headers ["Content-Type"] = mediaType + "; charset=utf-8";
 
-#if !NET_2_1
+#if !MOBILE
 				if (WebOperationContext.Current != null)
 					WebOperationContext.Current.OutgoingRequest.Apply (hp);
 #endif
@@ -382,7 +382,7 @@ namespace System.ServiceModel.Dispatcher
 					throw new ArgumentNullException ("parameters");
 				CheckMessageVersion (message.Version);
 
-#if !NET_2_1
+#if !MOBILE
 				if (OperationContext.Current != null) {
 					// Set response in the context
 					OperationContext.Current.IncomingMessage = message;
@@ -423,7 +423,7 @@ namespace System.ServiceModel.Dispatcher
 			object value;
 			XmlObjectSerializer serializer;
 
-#if !NET_2_1
+#if !MOBILE
 			protected override BodyWriter OnCreateBufferedCopy (int maxBufferSize)
 			{
 				return new WrappedBodyWriter (value, serializer, name, ns, fmt);
@@ -473,7 +473,7 @@ namespace System.ServiceModel.Dispatcher
 			void WriteObject (XmlObjectSerializer serializer, XmlDictionaryWriter writer, object value)
 			{
 				if (serializer != null){
-#if NET_2_1
+#if MOBILE
 					if (serializer is DataContractJsonSerializer)
 						((DataContractJsonSerializer) serializer).WriteObject (writer, value);
 					else
@@ -485,7 +485,7 @@ namespace System.ServiceModel.Dispatcher
 			}
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		internal abstract class WebDispatchMessageFormatter : WebMessageFormatter, IDispatchMessageFormatter
 		{
 			protected WebDispatchMessageFormatter (OperationDescription operation, ServiceEndpoint endpoint, QueryStringConverter converter, WebHttpBehavior behavior)

+ 2 - 2
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs

@@ -39,7 +39,7 @@ namespace System.ServiceModel.Web
 {
 	public class WebChannelFactory<TChannel> : ChannelFactory<TChannel>
 	{
-#if !NET_2_1
+#if !MOBILE
 		public WebChannelFactory ()
 			: base ()
 		{
@@ -84,7 +84,7 @@ namespace System.ServiceModel.Web
 
 		protected override void OnOpening ()
 		{
-#if !NET_2_1
+#if !MOBILE
 			if (Endpoint.Behaviors.Find<WebHttpBehavior> () == null)
 				Endpoint.Behaviors.Add (new WebHttpBehavior ());
 #endif

+ 6 - 6
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs

@@ -31,7 +31,7 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 
-#if NET_2_1 // Note that moonlight System.ServiceModel.Web.dll does not contain this class.
+#if MOBILE // Note that moonlight System.ServiceModel.Web.dll does not contain this class.
 using IncomingWebRequestContext = System.Object;
 using OutgoingWebResponseContext = System.Object;
 #else
@@ -44,11 +44,11 @@ using System.Xml.Serialization;
 namespace System.ServiceModel.Web
 {
 	public class WebOperationContext
-#if !NET_2_1
+#if !MOBILE
 	 : IExtension<OperationContext>
 #endif
 	{
-#if !NET_2_1
+#if !MOBILE
 		public static WebOperationContext Current {
 			get {
 				if (OperationContext.Current == null)
@@ -75,13 +75,13 @@ namespace System.ServiceModel.Web
 
 			outgoing_request = new OutgoingWebRequestContext ();
 			incoming_response = new IncomingWebResponseContext (operation);
-#if !NET_2_1
+#if !MOBILE
 			incoming_request = new IncomingWebRequestContext (operation);
 			outgoing_response = new OutgoingWebResponseContext ();
 #endif
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		public IncomingWebRequestContext IncomingRequest {
 			get { return incoming_request; }
 		}
@@ -95,7 +95,7 @@ namespace System.ServiceModel.Web
 			get { return outgoing_request; }
 		}
 
-#if !NET_2_1
+#if !MOBILE
 		public OutgoingWebResponseContext OutgoingResponse {
 			get { return outgoing_response; }
 		}

+ 3 - 3
mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs

@@ -31,7 +31,7 @@ using System.Linq;
 using System.ServiceModel.Channels;
 using System.Text;
 using System.Xml;
-#if !NET_2_1
+#if !MOBILE
 using System.Configuration;
 using System.ServiceModel.Configuration;
 #endif
@@ -52,7 +52,7 @@ namespace System.ServiceModel
 
 		public WebHttpBinding (string configurationName)
 		{
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
 			BindingsSection bindingsSection = ConfigUtil.BindingsSection;
 			WebHttpBindingElement el = (WebHttpBindingElement) bindingsSection ["webHttpBinding"].ConfiguredBindings.FirstOrDefault (c => c.Name == configurationName);
 			if (el != null) {
@@ -88,7 +88,7 @@ namespace System.ServiceModel
 			get { return EnvelopeVersion.None; }
 		}
 
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
 		[DefaultValue (false)]
 		public bool AllowCookies {
 			get { return t.AllowCookies; }

+ 1 - 1
mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs

@@ -34,7 +34,7 @@ namespace System.ServiceModel
 		public WebHttpSecurity ()
 		{
 			// there is no public constructor for transport ...
-#if !NET_2_1
+#if !MOBILE
 			Transport = new BasicHttpBinding ().Security.Transport;
 #endif
 		}

+ 3 - 3
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.

+ 1 - 1
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);

+ 1 - 1
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;

+ 2 - 2
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)

+ 2 - 2
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

+ 2 - 2
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
 		{

+ 2 - 2
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

+ 1 - 1
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) ||

+ 1 - 1
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);

+ 3 - 3
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

+ 4 - 4
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)

+ 2 - 2
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 ();

+ 2 - 2
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; }

+ 1 - 1
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;

+ 1 - 1
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,

+ 3 - 3
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);

+ 1 - 1
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

+ 1 - 1
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; }

+ 1 - 1
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)
 		{

+ 11 - 11
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).

+ 2 - 2
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,

+ 2 - 2
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 ();

+ 2 - 2
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> (

+ 5 - 5
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);

+ 2 - 2
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

+ 4 - 4
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,

+ 1 - 1
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; }

+ 2 - 2
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)

+ 1 - 1
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;

+ 5 - 5
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>);

+ 1 - 1
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>

+ 3 - 3
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; }
 		}

+ 3 - 3
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) {

+ 2 - 2
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 (

+ 2 - 2
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 ();

+ 4 - 4
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 ();

+ 5 - 5
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 (

+ 4 - 4
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 (

+ 3 - 3
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
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff