From: Ludovic Henry Date: Wed, 17 Aug 2016 15:40:30 +0000 (+0200) Subject: [mcs] Replace NET_2_1 by MOBILE X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=249daf43de9c64fefe9f103fc15bb462665b0167;p=mono.git [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. --- diff --git a/mcs/build/common/AssemblyRef.cs b/mcs/build/common/AssemblyRef.cs index a38d371845a..0a4673203d5 100644 --- a/mcs/build/common/AssemblyRef.cs +++ b/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 diff --git a/mcs/build/common/Consts.cs.in b/mcs/build/common/Consts.cs.in index 7351be92b40..87b005e763a 100644 --- a/mcs/build/common/Consts.cs.in +++ b/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 } diff --git a/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs b/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs index b5bf191148e..3e79d28a8fe 100644 --- a/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs index 70b25bd1d57..ff122878c95 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs +++ b/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; diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs index 23ccc8316eb..cb96ce12e46 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs +++ b/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; diff --git a/mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs b/mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs index 561d2fef4b2..ce13a368770 100644 --- a/mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.Core/Assembly/AssemblyInfo.cs b/mcs/class/System.Core/Assembly/AssemblyInfo.cs index aa3a0e53ccc..c4ab9f0d23a 100644 --- a/mcs/class/System.Core/Assembly/AssemblyInfo.cs +++ b/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 diff --git a/mcs/class/System.Core/System.Security.Cryptography/AesTransform.cs b/mcs/class/System.Core/System.Security.Cryptography/AesTransform.cs index b9700de921e..9e7d82c176b 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/AesTransform.cs +++ b/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 diff --git a/mcs/class/System.Core/System.Security.Cryptography/MD5Cng.cs b/mcs/class/System.Core/System.Security.Cryptography/MD5Cng.cs index 9a6920efe17..0e3658c5c12 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/MD5Cng.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA1Cng.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA1Cng.cs index 45d4ab55ea3..95d1034aa31 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA1Cng.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA256Cng.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA256Cng.cs index 347683170e0..772b81faabf 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA256Cng.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA256CryptoServiceProvider.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA256CryptoServiceProvider.cs index ac1016d7265..9012c58b216 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA256CryptoServiceProvider.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA384Cng.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA384Cng.cs index bbcdde1ffa7..b573aad961e 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA384Cng.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA384CryptoServiceProvider.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA384CryptoServiceProvider.cs index 43d8e0921af..af0abc744bf 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA384CryptoServiceProvider.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA512Cng.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA512Cng.cs index 5bcdcc29982..bf5689ecb39 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA512Cng.cs +++ b/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 { diff --git a/mcs/class/System.Core/System.Security.Cryptography/SHA512CryptoServiceProvider.cs b/mcs/class/System.Core/System.Security.Cryptography/SHA512CryptoServiceProvider.cs index ed8dabec175..9425a94e0c0 100644 --- a/mcs/class/System.Core/System.Security.Cryptography/SHA512CryptoServiceProvider.cs +++ b/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 { diff --git a/mcs/class/System.Core/tools/hashwrap.cs b/mcs/class/System.Core/tools/hashwrap.cs index cc22c959c4e..e80e209fe74 100644 --- a/mcs/class/System.Core/tools/hashwrap.cs +++ b/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 { diff --git a/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs b/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs index 05426acf59f..4c70c66dfd6 100644 --- a/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs +++ b/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 \ No newline at end of file diff --git a/mcs/class/System.Net/Assembly/AssemblyInfo.cs b/mcs/class/System.Net/Assembly/AssemblyInfo.cs index 249f6ebf8f6..600e5eb6c6c 100644 --- a/mcs/class/System.Net/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.Net/System.Net.NetworkInformation/NetworkChange_2_1.cs b/mcs/class/System.Net/System.Net.NetworkInformation/NetworkChange_2_1.cs index 3ec3f7dce02..5cdf15f1db9 100644 --- a/mcs/class/System.Net/System.Net.NetworkInformation/NetworkChange_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.NetworkInformation/NetworkInterface_2_1.cs b/mcs/class/System.Net/System.Net.NetworkInformation/NetworkInterface_2_1.cs index 4d68350ebaf..cafd9ed86e0 100644 --- a/mcs/class/System.Net/System.Net.NetworkInformation/NetworkInterface_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Policy/BaseDomainPolicy.cs b/mcs/class/System.Net/System.Net.Policy/BaseDomainPolicy.cs index ed40418052c..16089b5c933 100644 --- a/mcs/class/System.Net/System.Net.Policy/BaseDomainPolicy.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs b/mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs index ab6af6c6d3a..bd136e29803 100644 --- a/mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/ClientAccessPolicyParser.cs b/mcs/class/System.Net/System.Net.Policy/ClientAccessPolicyParser.cs index 78308a96b69..91c45e58801 100644 --- a/mcs/class/System.Net/System.Net.Policy/ClientAccessPolicyParser.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/CrossDomainPolicyManager.cs b/mcs/class/System.Net/System.Net.Policy/CrossDomainPolicyManager.cs index 0319404caf6..82ac9f93cae 100644 --- a/mcs/class/System.Net/System.Net.Policy/CrossDomainPolicyManager.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicy.cs b/mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicy.cs index 0ed9107e467..4bb8ffa3ff6 100644 --- a/mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicy.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicyParser.cs b/mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicyParser.cs index b3157df2a1c..c546e9d971a 100644 --- a/mcs/class/System.Net/System.Net.Policy/FlashCrossDomainPolicyParser.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/ICrossDomainPolicy.cs b/mcs/class/System.Net/System.Net.Policy/ICrossDomainPolicy.cs index 6a376685c15..a580fdd1bba 100644 --- a/mcs/class/System.Net/System.Net.Policy/ICrossDomainPolicy.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Policy/NoAccessPolicy.cs b/mcs/class/System.Net/System.Net.Policy/NoAccessPolicy.cs index 8d51d8361ba..d15e57dd103 100644 --- a/mcs/class/System.Net/System.Net.Policy/NoAccessPolicy.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net.Policy/PolicyDownloadPolicy.cs b/mcs/class/System.Net/System.Net.Policy/PolicyDownloadPolicy.cs index 797d4d9f7a4..1114d7ec055 100644 --- a/mcs/class/System.Net/System.Net.Policy/PolicyDownloadPolicy.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Policy/SiteOfOriginPolicy.cs b/mcs/class/System.Net/System.Net.Policy/SiteOfOriginPolicy.cs index 9b2ca1f4b71..8b17bcad1f0 100644 --- a/mcs/class/System.Net/System.Net.Policy/SiteOfOriginPolicy.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs b/mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs index 0b9bb2b479d..597109b3bb5 100644 --- a/mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs b/mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs index d806f723671..06a814a5fd0 100644 --- a/mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs b/mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs index 1260c7add6c..475742b1bdf 100644 --- a/mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs +++ b/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, diff --git a/mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs b/mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs index 5e76dd9f61c..c1d7c3b1da4 100644 --- a/mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs b/mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs index d44f7be28a6..a56c4db6b4b 100644 --- a/mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs b/mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs index c33c24f3794..e84762a7f31 100644 --- a/mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs b/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs index 69001b5d89b..fecd786e7fb 100644 --- a/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net/HttpWebResponse_2_1.cs b/mcs/class/System.Net/System.Net/HttpWebResponse_2_1.cs index d26af210250..a461f3029f4 100644 --- a/mcs/class/System.Net/System.Net/HttpWebResponse_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net/WebExceptionStatus_2_1.cs b/mcs/class/System.Net/System.Net/WebExceptionStatus_2_1.cs index 4af48941bf0..b6b8739f86d 100644 --- a/mcs/class/System.Net/System.Net/WebExceptionStatus_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs b/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs index 16a0d38b7eb..aa865bc077b 100644 --- a/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net/WebRequest_2_1.cs b/mcs/class/System.Net/System.Net/WebRequest_2_1.cs index 128708d31d6..bc8d445c5d2 100644 --- a/mcs/class/System.Net/System.Net/WebRequest_2_1.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net/WebResponse_2_1.cs b/mcs/class/System.Net/System.Net/WebResponse_2_1.cs index 495069b64cb..1f991db6276 100644 --- a/mcs/class/System.Net/System.Net/WebResponse_2_1.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net/WriteStreamClosedEventArgs_2_1.cs b/mcs/class/System.Net/System.Net/WriteStreamClosedEventArgs_2_1.cs index 049d9392259..51ad85c2e06 100644 --- a/mcs/class/System.Net/System.Net/WriteStreamClosedEventArgs_2_1.cs +++ b/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; diff --git a/mcs/class/System.Net/System.Net/WriteStreamClosedEventHandler_2_1.cs b/mcs/class/System.Net/System.Net/WriteStreamClosedEventHandler_2_1.cs index b901c07142f..26e4dbc454b 100644 --- a/mcs/class/System.Net/System.Net/WriteStreamClosedEventHandler_2_1.cs +++ b/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 { diff --git a/mcs/class/System.Runtime.DurableInstancing/Assembly/AssemblyInfo.cs b/mcs/class/System.Runtime.DurableInstancing/Assembly/AssemblyInfo.cs index 72f0502653f..edeecbe4e5c 100644 --- a/mcs/class/System.Runtime.DurableInstancing/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs b/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs index bc2dc31dae8..5995195a22e 100644 --- a/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.ServiceModel.Discovery/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Discovery/Assembly/AssemblyInfo.cs index f8ff5c399cf..6a9d85f5c70 100644 --- a/mcs/class/System.ServiceModel.Discovery/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.ServiceModel.Internals/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Internals/Assembly/AssemblyInfo.cs index 80b1075ba77..a9f41b5c7f9 100644 --- a/mcs/class/System.ServiceModel.Internals/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.ServiceModel.Routing/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Routing/Assembly/AssemblyInfo.cs index 6dd4a866226..0202afecb93 100644 --- a/mcs/class/System.ServiceModel.Routing/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.ServiceModel.Syndication/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Syndication/Assembly/AssemblyInfo.cs index c7c676fb7bf..f9e112c54eb 100644 --- a/mcs/class/System.ServiceModel.Syndication/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.ServiceModel.Web.Extensions/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Web.Extensions/Assembly/AssemblyInfo.cs index 0bd1bd0e04f..fc271094cd0 100644 --- a/mcs/class/System.ServiceModel.Web.Extensions/Assembly/AssemblyInfo.cs +++ b/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. diff --git a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs index a974b19de94..2e2baf595ce 100644 --- a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs +++ b/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")] diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs index b438b109684..0cf2bc5778b 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs +++ b/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 diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs index 3049f2901e3..c6a0b107553 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs +++ b/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 (context); } -#if !NET_2_1 +#if !MOBILE [MonoTODO ("Why is it overriden?")] public override bool CanBuildChannelListener (BindingContext context) { @@ -146,7 +146,7 @@ namespace System.ServiceModel.Channels return context.GetInnerProperty (); } -#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.Web/System.ServiceModel.Description/WebHttpBehavior.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs index d207385c97e..dc8915ff76d 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs +++ b/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) diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs index 6fb3b865903..aa159075998 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs +++ b/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) diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs index bee02209a1a..4a5289dd51f 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs @@ -39,7 +39,7 @@ namespace System.ServiceModel.Web { public class WebChannelFactory : ChannelFactory { -#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 () == null) Endpoint.Behaviors.Add (new WebHttpBehavior ()); #endif diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs index dfec47afe0e..a372b24c6b6 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs +++ b/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 #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; } } diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs index 8eee88bb876..a182f4f5192 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs +++ b/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; } diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs index 4effb2e71a7..b7aefe52dfd 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs +++ b/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 } 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 (context); } -#if !NET_2_1 +#if !MOBILE public override IChannelListener BuildChannelListener ( 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 (); } -#if !NET_2_1 +#if !MOBILE public virtual IChannelListener BuildChannelListener ( Uri listenUriBaseAddress, @@ -267,7 +267,7 @@ namespace System.ServiceModel.Channels return CreateContext (parameters).CanBuildInnerChannelFactory (); } -#if !NET_2_1 +#if !MOBILE public bool CanBuildChannelListener ( 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 (ctx); } -#if !NET_2_1 +#if !MOBILE public IChannelListener BuildInnerChannelListener () where TChannel : class, IChannel @@ -168,7 +168,7 @@ namespace System.ServiceModel.Channels return ctx.DequeueBindingElement ().CanBuildChannelFactory (ctx); } -#if !NET_2_1 +#if !MOBILE public bool CanBuildInnerChannelListener () 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 (); } -#if !NET_2_1 +#if !MOBILE public virtual IChannelListener BuildChannelListener ( BindingContext context) @@ -70,7 +70,7 @@ namespace System.ServiceModel.Channels return context.CanBuildInnerChannelFactory (); } -#if !NET_2_1 +#if !MOBILE public virtual bool CanBuildChannelListener ( 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 () { 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 ( BindingContext context) { @@ -201,7 +201,7 @@ namespace System.ServiceModel.Channels return new HttpChannelFactory (this, context); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 internal static object ListenerBuildLock = new object (); public override IChannelListener BuildChannelListener ( @@ -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 (context); } -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO] public override IChannelListener BuildChannelListener ( @@ -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 (); } -#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 BuildChannelListener (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 (); @@ -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 (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 (); #else @@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels protected abstract IChannelFactory BuildChannelFactoryCore (BindingContext context); -#if !NET_2_1 && !XAMMAC_4_5 +#if !MOBILE && !XAMMAC_4_5 [MonoTODO ("Implement for TransportSecurityBindingElement")] public override bool CanBuildChannelListener (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 (context); } -#if !NET_2_1 +#if !MOBILE public override IChannelListener BuildChannelListener ( 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 (); } -#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 BuildChannelListenerCore ( 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() == 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 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 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(); #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); 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 #else SynchronizedKeyedCollection 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 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 inspectors @@ -93,7 +93,7 @@ namespace System.ServiceModel.Dispatcher get { return action; } } -#if !NET_2_1 +#if !MOBILE public SynchronizedCollection 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 scoped = new Dictionary (); -#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 (t)) return true; -#if !NET_2_1 +#if !MOBILE if (isDuplex && CanCastTo (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] diff --git a/mcs/class/System.XML/Assembly/AssemblyInfo.cs b/mcs/class/System.XML/Assembly/AssemblyInfo.cs index 3b61fe6384a..cd45fc2ed31 100644 --- a/mcs/class/System.XML/Assembly/AssemblyInfo.cs +++ b/mcs/class/System.XML/Assembly/AssemblyInfo.cs @@ -55,13 +55,13 @@ using System.Runtime.InteropServices; [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] -#if NET_2_1 +#if MOBILE [assembly: AssemblyKeyFile ("../silverlight.pub")] #else [assembly: AssemblyKeyFile ("../ecma.pub")] #endif -#if NET_2_1 +#if MOBILE [assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")] #else [assembly: AllowPartiallyTrustedCallers] diff --git a/mcs/class/System.XML/Makefile b/mcs/class/System.XML/Makefile index 84a898e6ee3..4c6d072bd6e 100644 --- a/mcs/class/System.XML/Makefile +++ b/mcs/class/System.XML/Makefile @@ -20,7 +20,7 @@ TXT_RESOURCE_STRINGS = \ LIB_MCS_FLAGS = -nowarn:219,414,649,1717 -unsafe -d:ASYNC ifeq (2.1, $(FRAMEWORK_VERSION)) -LIB_MCS_FLAGS += -d:AGCLR -d:NET_2_1_HACK -d:DISABLE_XSLT_COMPILER -d:DISABLE_XSLT_SCRIPT,MONO_HYBRID_SYSTEM_XML -d:DISABLE_CAS_USE +LIB_MCS_FLAGS += -d:AGCLR -d:DISABLE_XSLT_COMPILER -d:DISABLE_XSLT_SCRIPT,MONO_HYBRID_SYSTEM_XML -d:DISABLE_CAS_USE endif TEST_LIB_REFS = System.Data System.Core diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlChoiceIdentifierAttribute.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlChoiceIdentifierAttribute.cs index cf1434afff2..fc4fefc9667 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlChoiceIdentifierAttribute.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlChoiceIdentifierAttribute.cs @@ -60,7 +60,7 @@ namespace System.Xml.Serialization set { memberName = value; } } -#if NET_2_1 +#if MOBILE MemberInfo member; // It is used only in 2.1 S.X.Serialization.dll in MS SDK. internal MemberInfo MemberInfo { diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs index b68d33eec94..fc0a36035c7 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs @@ -126,7 +126,7 @@ namespace System.Xml.Serialization { get { return _mapMember.Name; } } -#if !NET_2_1 +#if !MOBILE public string GenerateTypeName (System.CodeDom.Compiler.CodeDomProvider codeProvider) { string ret = codeProvider.CreateValidIdentifier (_mapMember.TypeData.FullTypeName); diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs index 6338a8dc14f..0c4e131b87d 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs @@ -157,7 +157,7 @@ namespace System.Xml.Serialization { mps.RelatedMaps = relatedMaps; mps.Format = SerializationFormat.Literal; Type[] extraTypes = includedTypes != null ? (Type[])includedTypes.ToArray(typeof(Type)) : null; -#if !NET_2_1 +#if !MOBILE mps.Source = new MembersSerializationSource (elementName, hasWrapperElement, members, false, true, ns, extraTypes); if (allowPrivateTypes) mps.Source.CanBeGenerated = false; #endif @@ -226,7 +226,7 @@ namespace System.Xml.Serialization { map.RelatedMaps = relatedMaps; map.Format = SerializationFormat.Literal; Type[] extraTypes = includedTypes != null ? (Type[]) includedTypes.ToArray (typeof (Type)) : null; -#if !NET_2_1 +#if !MOBILE map.Source = new XmlTypeSerializationSource (typeData.Type, root, attributeOverrides, defaultNamespace, extraTypes); if (allowPrivateTypes) map.Source.CanBeGenerated = false; #endif diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs index aa2852faf19..0805d7f61a6 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs @@ -37,7 +37,7 @@ using System.Reflection; using System.Xml; using System.Xml.Schema; using System.Text; -#if !NET_2_1 +#if !MOBILE using System.CodeDom; using System.CodeDom.Compiler; using Microsoft.CSharp; @@ -121,7 +121,7 @@ namespace System.Xml.Serialization // debugging pourposes by adding the "nofallback" option. // For example: MONO_XMLSERIALIZER_THS=0,nofallback -#if NET_2_1 +#if MOBILE string db = null; string th = null; generationThreshold = -1; @@ -150,7 +150,7 @@ namespace System.Xml.Serialization } #endif deleteTempFiles = (db == null || db == "no"); -#if !NET_2_1 && CONFIGURATION_DEP +#if !MOBILE && CONFIGURATION_DEP // DiagnosticsSection ConfigurationSection table = (ConfigurationSection) ConfigurationSettings.GetConfig("system.diagnostics"); var bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; @@ -579,7 +579,7 @@ namespace System.Xml.Serialization } } -#if !NET_2_1 +#if !MOBILE if (!typeMapping.Source.CanBeGenerated || generationThreshold == -1) return new XmlSerializationWriterInterpreter (typeMapping); @@ -600,7 +600,7 @@ namespace System.Xml.Serialization XmlSerializationReader CreateReader (XmlMapping typeMapping) { -#if !NET_2_1 +#if !MOBILE XmlSerializationReader reader; lock (this) { @@ -630,7 +630,7 @@ namespace System.Xml.Serialization return new XmlSerializationReaderInterpreter (typeMapping); } -#if NET_2_1 +#if MOBILE void CheckGeneratedTypes (XmlMapping typeMapping) { throw new NotImplementedException(); diff --git a/mcs/class/System.Xaml/Assembly/AssemblyInfo.cs b/mcs/class/System.Xaml/Assembly/AssemblyInfo.cs index 54cd8471352..8581509e354 100644 --- a/mcs/class/System.Xaml/Assembly/AssemblyInfo.cs +++ b/mcs/class/System.Xaml/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")] diff --git a/mcs/class/System.Xaml/System.Xaml/TypeExtensionMethods.cs b/mcs/class/System.Xaml/System.Xaml/TypeExtensionMethods.cs index c7002e5c8ee..ccf8e0f703a 100644 --- a/mcs/class/System.Xaml/System.Xaml/TypeExtensionMethods.cs +++ b/mcs/class/System.Xaml/System.Xaml/TypeExtensionMethods.cs @@ -124,7 +124,7 @@ namespace System.Xaml return TypeDescriptor.GetConverter (type); } - // FIXME: I want this to cover all the existing types and make it valid in both NET_2_1 and !NET_2_1. + // FIXME: I want this to cover all the existing types and make it valid in both MOBILE and !MOBILE. class ConvertibleTypeConverter : TypeConverter { Type type; diff --git a/mcs/class/System.Xml.Linq/Assembly/AssemblyInfo.cs b/mcs/class/System.Xml.Linq/Assembly/AssemblyInfo.cs index 169f6d17271..e6ac4809d4b 100644 --- a/mcs/class/System.Xml.Linq/Assembly/AssemblyInfo.cs +++ b/mcs/class/System.Xml.Linq/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")] diff --git a/mcs/class/System/Assembly/AssemblyInfo.cs b/mcs/class/System/Assembly/AssemblyInfo.cs index 69456085a2b..a21094034ef 100644 --- a/mcs/class/System/Assembly/AssemblyInfo.cs +++ b/mcs/class/System/Assembly/AssemblyInfo.cs @@ -55,21 +55,21 @@ using System.Runtime.InteropServices; [assembly: NeutralResourcesLanguage ("en-US")] [assembly: ComVisible (false)] -#if !NET_2_1 +#if !MOBILE [assembly: ComCompatibleVersion (1, 0, 3300, 0)] [assembly: AllowPartiallyTrustedCallers] #endif #if !BOOTSTRAP_WITH_OLDLIB [assembly: AssemblyDelaySign (true)] -#if NET_2_1 +#if MOBILE [assembly: AssemblyKeyFile ("../silverlight.pub")] #else [assembly: AssemblyKeyFile ("../ecma.pub")] #endif #endif -#if NET_2_1 && !MOBILE +#if MOBILE && !MOBILE [assembly: InternalsVisibleTo ("System.Net, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")] #else [assembly: InternalsVisibleTo ("System.ComponentModel.DataAnnotations, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] diff --git a/mcs/class/System/System.Diagnostics/FileVersionInfo.cs b/mcs/class/System/System.Diagnostics/FileVersionInfo.cs index cf38a5e1125..e59d0a89fa0 100644 --- a/mcs/class/System/System.Diagnostics/FileVersionInfo.cs +++ b/mcs/class/System/System.Diagnostics/FileVersionInfo.cs @@ -144,7 +144,7 @@ namespace System.Diagnostics { public string FileName { get { -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.PathDiscovery, filename).Demand (); } @@ -278,7 +278,7 @@ namespace System.Diagnostics { public static FileVersionInfo GetVersionInfo (string fileName) { -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.Read, fileName).Demand (); } @@ -293,7 +293,7 @@ namespace System.Diagnostics { return fvi; } - // use our own AppendFormat because NET_2_1 have only this overload + // use our own AppendFormat because MOBILE have only this overload static void AppendFormat (StringBuilder sb, string format, params object [] args) { sb.AppendFormat (format, args); diff --git a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs index bd1ea619bad..c608bfee433 100644 --- a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs +++ b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs @@ -33,7 +33,7 @@ using System.Collections; namespace System.Diagnostics { -#if NET_2_1 +#if MOBILE public class ProcessModuleCollectionBase : System.Collections.Generic.List { protected ProcessModuleCollectionBase InnerList { @@ -48,7 +48,7 @@ namespace System.Diagnostics #endif public class ProcessModuleCollection : -#if !NET_2_1 +#if !MOBILE ReadOnlyCollectionBase #else ProcessModuleCollectionBase diff --git a/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs b/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs index b2fbdbfcb16..141b1821568 100644 --- a/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs +++ b/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs @@ -33,7 +33,7 @@ using System.Collections; namespace System.Diagnostics { -#if NET_2_1 +#if MOBILE public class ProcessThreadCollectionBase : System.Collections.Generic.List { protected ProcessThreadCollectionBase InnerList { @@ -54,7 +54,7 @@ namespace System.Diagnostics #endif public class ProcessThreadCollection : -#if !NET_2_1 +#if !MOBILE ReadOnlyCollectionBase #else ProcessThreadCollectionBase diff --git a/mcs/class/System/System.Net.Mail/MailMessage.cs b/mcs/class/System/System.Net.Mail/MailMessage.cs index 3b978ac32fa..40ee139b7a0 100644 --- a/mcs/class/System/System.Net.Mail/MailMessage.cs +++ b/mcs/class/System/System.Net.Mail/MailMessage.cs @@ -255,7 +255,7 @@ namespace System.Net.Mail { if (Encoding.ASCII.Equals (enc)) return TransferEncoding.SevenBit; else if (Encoding.UTF8.CodePage == enc.CodePage || -#if !NET_2_1 +#if !MOBILE Encoding.Unicode.CodePage == enc.CodePage || Encoding.UTF32.CodePage == enc.CodePage #else Encoding.Unicode.CodePage == enc.CodePage diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs index f894f490612..1f265d200e5 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs +++ b/mcs/class/System/System.Net.Sockets/Socket.cs @@ -123,7 +123,7 @@ namespace System.Net.Sockets // // Also note that catching ConfigurationErrorsException specifically would require library dependency // System.Configuration, and wanted to avoid that. -#if !NET_2_1 +#if !MOBILE #if CONFIGURATION_DEP try { SettingsSection config; @@ -170,7 +170,7 @@ namespace System.Net.Sockets public Socket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType) { -#if NET_2_1 && !MOBILE +#if MOBILE && !MOBILE switch (addressFamily) { case AddressFamily.InterNetwork: // ok case AddressFamily.InterNetworkV6: // ok @@ -208,7 +208,7 @@ namespace System.Net.Sockets if (error != 0) throw new SocketException (error); -#if !NET_2_1 || MOBILE +#if !MOBILE || MOBILE SocketDefaults (); #endif } @@ -289,7 +289,7 @@ namespace System.Net.Sockets get { return ipv6_supported == 1; } } -#if NET_2_1 +#if MOBILE public static bool OSSupportsIPv4 { get { return ipv4_supported == 1; } } @@ -308,7 +308,7 @@ namespace System.Net.Sockets } #endif -#if NET_2_1 +#if MOBILE public static bool OSSupportsIPv6 { get { return ipv6_supported == 1; } } @@ -3408,7 +3408,7 @@ namespace System.Net.Sockets void ThrowIfUdp () { -#if !NET_2_1 || MOBILE +#if !MOBILE || MOBILE if (protocol_type == ProtocolType.Udp) throw new SocketException ((int)SocketError.ProtocolOption); #endif diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs index 98622cb981a..361f55ec929 100644 --- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs +++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs @@ -111,7 +111,7 @@ namespace System.Net.Sockets set; } -#if !NET_2_1 +#if !MOBILE public TransmitFileOptions SendPacketsFlags { get; set; diff --git a/mcs/class/System/System.Net/AuthenticationManager.cs b/mcs/class/System/System.Net/AuthenticationManager.cs index e987c5bd55f..1ed7dfe075f 100644 --- a/mcs/class/System/System.Net/AuthenticationManager.cs +++ b/mcs/class/System/System.Net/AuthenticationManager.cs @@ -51,7 +51,7 @@ namespace System.Net return; modules = new ArrayList (); -#if NET_2_1 +#if MOBILE modules.Add (new NtlmClient ()); modules.Add (new DigestClient ()); modules.Add (new BasicClient ()); diff --git a/mcs/class/System/System.Net/FtpWebRequest.cs b/mcs/class/System/System.Net/FtpWebRequest.cs index 1fbf80dc7ce..9e2c655cb2d 100644 --- a/mcs/class/System/System.Net/FtpWebRequest.cs +++ b/mcs/class/System/System.Net/FtpWebRequest.cs @@ -185,7 +185,7 @@ namespace System.Net } } -#if !NET_2_1 +#if !MOBILE [MonoTODO] public static new RequestCachePolicy DefaultCachePolicy { diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs index 25ea0ad0577..25a5d2877fd 100644 --- a/mcs/class/System/System.Net/HttpWebRequest.cs +++ b/mcs/class/System/System.Net/HttpWebRequest.cs @@ -133,7 +133,7 @@ namespace System.Net static HttpWebRequest () { defaultMaxResponseHeadersLength = 64 * 1024; -#if !NET_2_1 +#if !MOBILE NetConfig config = ConfigurationSettings.GetConfig ("system.net/settings") as NetConfig; if (config != null) { int x = config.MaxResponseHeadersLength; @@ -145,7 +145,7 @@ namespace System.Net #endif } -#if NET_2_1 +#if MOBILE public #else internal @@ -382,7 +382,7 @@ namespace System.Net SetSpecialHeaders(headerName, HttpProtocolUtils.date2string(dateTime)); } -#if !NET_2_1 +#if !MOBILE [MonoTODO] public static new RequestCachePolicy DefaultCachePolicy { diff --git a/mcs/class/System/System.Net/ServicePointManager.cs b/mcs/class/System/System.Net/ServicePointManager.cs index 32a0148b8ea..b3c996044ef 100644 --- a/mcs/class/System/System.Net/ServicePointManager.cs +++ b/mcs/class/System/System.Net/ServicePointManager.cs @@ -138,14 +138,14 @@ namespace System.Net public const int DefaultPersistentConnectionLimit = 2; #endif -#if !NET_2_1 +#if !MOBILE const string configKey = "system.net/connectionManagement"; static ConnectionManagementData manager; #endif static ServicePointManager () { -#if !NET_2_1 +#if !MOBILE #if CONFIGURATION_DEP object cfg = ConfigurationManager.GetSection (configKey); ConnectionManagementSection s = cfg as ConnectionManagementSection; @@ -200,7 +200,7 @@ namespace System.Net throw new ArgumentOutOfRangeException ("value"); defaultConnectionLimit = value; -#if !NET_2_1 +#if !MOBILE if (manager != null) manager.Add ("*", defaultConnectionLimit); #endif @@ -356,7 +356,7 @@ namespace System.Net throw new InvalidOperationException ("maximum number of service points reached"); int limit; -#if NET_2_1 +#if MOBILE limit = defaultConnectionLimit; #else string addr = address.ToString (); diff --git a/mcs/class/System/System/UriTypeConverter.cs b/mcs/class/System/System/UriTypeConverter.cs index 2d7f9cf1415..ea2fe62b6bf 100644 --- a/mcs/class/System/System/UriTypeConverter.cs +++ b/mcs/class/System/System/UriTypeConverter.cs @@ -27,7 +27,7 @@ // using System.ComponentModel; -#if !NET_2_1 +#if !MOBILE using System.ComponentModel.Design.Serialization; #endif using System.Globalization; @@ -49,7 +49,7 @@ namespace System { return true; if (type == typeof (Uri)) return true; -#if NET_2_1 +#if MOBILE return false; #else return (type == typeof (InstanceDescriptor)); @@ -75,7 +75,7 @@ namespace System { public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value) { if (value == null) { -#if NET_2_1 +#if MOBILE throw new NotSupportedException (Locale.GetText ("Cannot convert from value.")); #else throw new ArgumentNullException ("value"); @@ -90,14 +90,14 @@ namespace System { string s = (value as string); if (s != null) { -#if NET_2_1 +#if MOBILE if (s == "") return null; #endif return new Uri (s, UriKind.RelativeOrAbsolute); } -#if !NET_2_1 +#if !MOBILE InstanceDescriptor id = (value as InstanceDescriptor); if (id != null) { return id.Invoke (); @@ -117,7 +117,7 @@ namespace System { return uri.ToString (); if (destinationType == typeof (Uri)) return uri; -#if !NET_2_1 +#if !MOBILE if (destinationType == typeof (InstanceDescriptor)) { ConstructorInfo ci = typeof (Uri).GetConstructor (new Type [2] { typeof (string), typeof (UriKind) }); return new InstanceDescriptor (ci , new object [] { uri.ToString (), uri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative }); @@ -127,14 +127,14 @@ namespace System { #endif } -#if NET_2_1 +#if MOBILE throw new NotSupportedException (Locale.GetText ("Cannot convert to destination type.")); #else return base.ConvertTo (context, culture, value, destinationType); #endif } -#if !NET_2_1 +#if !MOBILE public override bool IsValid (ITypeDescriptorContext context, object value) { if (value == null) diff --git a/mcs/class/System/Test/System.ComponentModel/CategoryAttributeTests.cs b/mcs/class/System/Test/System.ComponentModel/CategoryAttributeTests.cs index 1d5e4e6dbdf..b9261cbe862 100644 --- a/mcs/class/System/Test/System.ComponentModel/CategoryAttributeTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/CategoryAttributeTests.cs @@ -47,7 +47,7 @@ namespace MonoTests.System.ComponentModel { Assert.AreEqual(CM.CategoryAttribute.Key.Category, "Key", "#9"); Assert.AreEqual(CM.CategoryAttribute.Layout.Category, "Layout", "#10"); Assert.AreEqual(CM.CategoryAttribute.Mouse.Category, "Mouse", "#11"); -#if NET_2_1 +#if MOBILE Assert.AreEqual(CM.CategoryAttribute.Default.Category, "Default", "#12"); Assert.AreEqual(CM.CategoryAttribute.DragDrop.Category, "DragDrop", "#13"); Assert.AreEqual(CM.CategoryAttribute.WindowStyle.Category, "WindowStyle", "#14"); diff --git a/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs b/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs index 6f763923cbf..8922c14f00e 100644 --- a/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs +++ b/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs @@ -87,7 +87,7 @@ public class ServicePointManagerTest ServicePointManager.MaxServicePoints = 0; ServicePoint sp = ServicePointManager.FindServicePoint (googleUri, new WebProxy (apacheUri)); Assert.AreEqual (apacheUri, sp.Address, "#1"); -#if NET_2_1 && !MONODROID +#if MOBILE && !MONODROID Assert.AreEqual (10, sp.ConnectionLimit, "#2"); #else Assert.AreEqual (2, sp.ConnectionLimit, "#2"); diff --git a/mcs/class/corlib/Assembly/AssemblyInfo.cs b/mcs/class/corlib/Assembly/AssemblyInfo.cs index 3c68cceb82b..75828e154eb 100644 --- a/mcs/class/corlib/Assembly/AssemblyInfo.cs +++ b/mcs/class/corlib/Assembly/AssemblyInfo.cs @@ -59,7 +59,7 @@ using System.Runtime.InteropServices; [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] -#if NET_2_1 +#if MOBILE [assembly: AssemblyKeyFile ("../silverlight.pub")] #else [assembly: AssemblyKeyFile ("../ecma.pub")] diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index 1cd1a7af026..a0f17b0f196 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -203,7 +203,7 @@ tzi.exe:System/AndroidPlatform.cs $(wildcard System/TimeZone*.cs) ../../build/co trap "rm -f $(TMP_FILE1) $(TMP_FILE2)" EXIT INT QUIT TERM && \ sed 's/Environment\.GetResourceString/string.Format/g' ../referencesource/mscorlib/system/timezoneinfo.cs > $(TMP_FILE1) && \ sed 's/StringBuilder\.DefaultCapacity/100/g' ../referencesource/mscorlib/system/text/stringbuildercache.cs > $(TMP_FILE2) && \ - $(MCS) /debug+ /out:$@ -unsafe -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) "/d:SELF_TEST;NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;MOBILE;MOBILE_DYNAMIC;MONODROID;ANDROID" $^ $(TMP_FILE1) $(TMP_FILE2) + $(MCS) /debug+ /out:$@ -unsafe -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) "/d:SELF_TEST;NET_1_1;NET_2_0;MOBILE;NET_3_5;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;MOBILE;MOBILE_DYNAMIC;MONODROID;ANDROID" $^ $(TMP_FILE1) $(TMP_FILE2) android-pull-tzdb: mkdir -p android/tzdb/usr/share/zoneinfo diff --git a/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs index b4ad9f294c3..b7eeefe229f 100644 --- a/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs +++ b/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs @@ -30,7 +30,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !NET_2_1 +#if !MOBILE using System; using System.Text; @@ -67,5 +67,5 @@ namespace Microsoft.Win32 { } } -#endif // NET_2_1 +#endif // MOBILE diff --git a/mcs/class/corlib/Microsoft.Win32/RegistryKeyPermissionCheck.cs b/mcs/class/corlib/Microsoft.Win32/RegistryKeyPermissionCheck.cs index 7994839edac..a89a865de92 100644 --- a/mcs/class/corlib/Microsoft.Win32/RegistryKeyPermissionCheck.cs +++ b/mcs/class/corlib/Microsoft.Win32/RegistryKeyPermissionCheck.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !NET_2_1 +#if !MOBILE namespace Microsoft.Win32 { public enum RegistryKeyPermissionCheck diff --git a/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs index 757dc5eb213..30a035593a8 100644 --- a/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs +++ b/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs @@ -37,7 +37,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !NET_2_1 +#if !MOBILE using System; using System.Collections; @@ -1029,5 +1029,5 @@ namespace Microsoft.Win32 { } } -#endif // NET_2_1 +#endif // MOBILE diff --git a/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs index c5335ffd0e9..5b27b8aaf90 100644 --- a/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs +++ b/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.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; @@ -626,5 +626,5 @@ namespace Microsoft.Win32 } } -#endif // NET_2_1 +#endif // MOBILE diff --git a/mcs/class/corlib/Microsoft.Win32/Win32ResultCode.cs b/mcs/class/corlib/Microsoft.Win32/Win32ResultCode.cs index 1d0cbdaa859..ba69eb7d5a4 100644 --- a/mcs/class/corlib/Microsoft.Win32/Win32ResultCode.cs +++ b/mcs/class/corlib/Microsoft.Win32/Win32ResultCode.cs @@ -30,7 +30,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !NET_2_1 +#if !MOBILE using System; using System.Runtime.InteropServices; @@ -61,5 +61,5 @@ namespace Microsoft.Win32 } } -#endif // NET_2_1 +#endif // MOBILE diff --git a/mcs/class/corlib/System.Diagnostics/StackFrame.cs b/mcs/class/corlib/System.Diagnostics/StackFrame.cs index e51e9dbfc28..7de9ccce096 100644 --- a/mcs/class/corlib/System.Diagnostics/StackFrame.cs +++ b/mcs/class/corlib/System.Diagnostics/StackFrame.cs @@ -134,7 +134,7 @@ namespace System.Diagnostics { public virtual string GetFileName() { -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled && (fileName != null) && (fileName.Length > 0)) { string fn = Path.GetFullPath (fileName); new FileIOPermission (FileIOPermissionAccess.PathDiscovery, fn).Demand (); diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs index 8b4a3504d3a..7d043f2300c 100644 --- a/mcs/class/corlib/System.Globalization/CultureInfo.cs +++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs @@ -181,7 +181,7 @@ namespace System.Globalization get { return territory; } } -#if !NET_2_1 +#if !MOBILE // FIXME: It is implemented, but would be hell slow. [ComVisible (false)] public CultureTypes CultureTypes { diff --git a/mcs/class/corlib/System.IO/Directory.cs b/mcs/class/corlib/System.IO/Directory.cs index ed773f6ca6a..522f305e427 100644 --- a/mcs/class/corlib/System.IO/Directory.cs +++ b/mcs/class/corlib/System.IO/Directory.cs @@ -86,7 +86,7 @@ namespace System.IO static DirectoryInfo CreateDirectoriesInternal (string path) { -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.Read | FileIOPermissionAccess.Write, path).Demand (); } @@ -232,7 +232,7 @@ namespace System.IO SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight string result = InsecureGetCurrentDirectory(); -#if !NET_2_1 +#if !MOBILE if ((result != null) && (result.Length > 0) && SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.PathDiscovery, result).Demand (); } diff --git a/mcs/class/corlib/System.IO/File.cs b/mcs/class/corlib/System.IO/File.cs index 92389257c5c..de55602cdbe 100644 --- a/mcs/class/corlib/System.IO/File.cs +++ b/mcs/class/corlib/System.IO/File.cs @@ -39,7 +39,7 @@ using System.Security; using System.Text; using System.Runtime.InteropServices; -#if !NET_2_1 +#if !MOBILE using System.Security.AccessControl; #endif @@ -147,7 +147,7 @@ namespace System.IO FileShare.None, bufferSize, options); } -#if !NET_2_1 +#if !MOBILE [MonoLimitation ("FileOptions and FileSecurity are ignored")] public static FileStream Create (string path, int bufferSize, FileOptions options, @@ -201,7 +201,7 @@ namespace System.IO return MonoIO.ExistsFile (path, out error); } -#if !NET_2_1 +#if !MOBILE public static FileSecurity GetAccessControl (string path) { // AccessControlSections.Audit requires special permissions. @@ -434,7 +434,7 @@ namespace System.IO } } -#if !NET_2_1 +#if !MOBILE public static void SetAccessControl (string path, FileSecurity fileSecurity) { diff --git a/mcs/class/corlib/System.IO/FileStream.cs b/mcs/class/corlib/System.IO/FileStream.cs index 0e20810547c..b2a15cd2b60 100644 --- a/mcs/class/corlib/System.IO/FileStream.cs +++ b/mcs/class/corlib/System.IO/FileStream.cs @@ -41,7 +41,7 @@ using System.Security.Permissions; using System.Threading; using Microsoft.Win32.SafeHandles; -#if NET_2_1 +#if MOBILE using System.IO.IsolatedStorage; #else using System.Security.AccessControl; @@ -176,7 +176,7 @@ namespace System.IO throw new ArgumentOutOfRangeException ("bufferSize", "Positive number required."); if (mode < FileMode.CreateNew || mode > FileMode.Append) { -#if NET_2_1 +#if MOBILE if (anonymous) throw new ArgumentException ("mode", "Enum value was out of legal range."); else @@ -942,7 +942,7 @@ namespace System.IO throw exc; } -#if !NET_2_1 +#if !MOBILE public FileSecurity GetAccessControl () { if (safeHandle.IsClosed) diff --git a/mcs/class/corlib/System.IO/MonoIO.cs b/mcs/class/corlib/System.IO/MonoIO.cs index 994358c86be..7297e18d7a2 100644 --- a/mcs/class/corlib/System.IO/MonoIO.cs +++ b/mcs/class/corlib/System.IO/MonoIO.cs @@ -36,7 +36,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; using Microsoft.Win32.SafeHandles; -#if NET_2_1 +#if MOBILE using System.IO.IsolatedStorage; #endif @@ -108,7 +108,7 @@ namespace System.IO return new IOException (message, unchecked((int)0x80070000) | (int)error); case MonoIOError.ERROR_INVALID_DRIVE: message = String.Format ("Could not find the drive '{0}'. The drive might not be ready or might not be mapped.", path); -#if !NET_2_1 +#if !MOBILE return new DriveNotFoundException (message); #else return new IOException (message, unchecked((int)0x80070000) | (int)error); diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs index d0512f24695..09ea4405953 100644 --- a/mcs/class/corlib/System.IO/Path.cs +++ b/mcs/class/corlib/System.IO/Path.cs @@ -281,7 +281,7 @@ namespace System.IO { SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.PathDiscovery, fullpath).Demand (); } diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs index 0a189e1faa7..c098713ca97 100644 --- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs @@ -384,7 +384,7 @@ namespace System.Reflection.Emit internal void AddPermissionRequests (PermissionSet required, PermissionSet optional, PermissionSet refused) { -#if !NET_2_1 +#if !MOBILE if (created) throw new InvalidOperationException ("Assembly was already saved."); diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs index d74a09a1ced..681e7cf8058 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs @@ -201,7 +201,7 @@ namespace System.Reflection.Emit { public void AddDeclarativeSecurity (SecurityAction action, PermissionSet pset) { -#if !NET_2_1 +#if !MOBILE if (pset == null) throw new ArgumentNullException ("pset"); if ((action == SecurityAction.RequestMinimum) || diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs index 3772d98b82c..84c01c97bb7 100644 --- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs @@ -478,7 +478,7 @@ namespace System.Reflection.Emit public void AddDeclarativeSecurity (SecurityAction action, PermissionSet pset) { -#if !NET_2_1 +#if !MOBILE if (pset == null) throw new ArgumentNullException ("pset"); if ((action == SecurityAction.RequestMinimum) || diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs index 7216a169e46..27553b18c7e 100644 --- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs @@ -259,7 +259,7 @@ namespace System.Reflection.Emit public void AddDeclarativeSecurity (SecurityAction action, PermissionSet pset) { -#if !NET_2_1 +#if !MOBILE if (pset == null) throw new ArgumentNullException ("pset"); if ((action == SecurityAction.RequestMinimum) || diff --git a/mcs/class/corlib/System.Reflection/Assembly.cs b/mcs/class/corlib/System.Reflection/Assembly.cs index 174d5da5813..e9418c03393 100644 --- a/mcs/class/corlib/System.Reflection/Assembly.cs +++ b/mcs/class/corlib/System.Reflection/Assembly.cs @@ -145,7 +145,7 @@ namespace System.Reflection { private string GetCodeBase (bool escaped) { string cb = get_code_base (escaped); -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { // we cannot divulge local file informations if (String.Compare ("FILE://", 0, cb, 0, 7, true, CultureInfo.InvariantCulture) == 0) { @@ -215,7 +215,7 @@ namespace System.Reflection { return String.Empty; string loc = get_location (); -#if !NET_2_1 +#if !MOBILE if ((loc != String.Empty) && SecurityManager.SecurityEnabled) { // we cannot divulge local file informations new FileIOPermission (FileIOPermissionAccess.PathDiscovery, loc).Demand (); @@ -531,7 +531,7 @@ namespace System.Reflection { public static Assembly LoadFrom (String assemblyFile, Evidence securityEvidence) { Assembly a = LoadFrom (assemblyFile, false); -#if !NET_2_1 +#if !MOBILE if ((a != null) && (securityEvidence != null)) { // merge evidence (i.e. replace defaults with provided evidences) a.Evidence.Merge (securityEvidence); @@ -803,7 +803,7 @@ namespace System.Reflection { return other._mono_assembly == _mono_assembly; } -#if !NET_2_1 +#if !MOBILE // Code Access Security internal void Resolve () diff --git a/mcs/class/corlib/System.Reflection/EventInfo.cs b/mcs/class/corlib/System.Reflection/EventInfo.cs index 9668f1f56c2..28a727924cd 100644 --- a/mcs/class/corlib/System.Reflection/EventInfo.cs +++ b/mcs/class/corlib/System.Reflection/EventInfo.cs @@ -253,7 +253,7 @@ namespace System.Reflection { } addHandlerType = addHandlerDelegateType.MakeGenericType (typeVector); -#if NET_2_1 +#if MOBILE // with Silverlight a coreclr failure (e.g. Transparent caller creating a delegate on a Critical method) // would normally throw an ArgumentException, so we set throwOnBindFailure to false and check for a null // delegate that we can transform into a MethodAccessException diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs index c93233dfffb..9e5197df13c 100644 --- a/mcs/class/corlib/System.Reflection/MonoMethod.cs +++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs @@ -305,7 +305,7 @@ namespace System.Reflection { o = InternalInvoke (obj, parameters, out exc); } catch (ThreadAbortException) { throw; -#if NET_2_1 +#if MOBILE } catch (MethodAccessException) { throw; #endif @@ -659,7 +659,7 @@ namespace System.Reflection { try { o = InternalInvoke (obj, parameters, out exc); -#if NET_2_1 +#if MOBILE } catch (MethodAccessException) { throw; #endif diff --git a/mcs/class/corlib/System.Reflection/MonoModule.cs b/mcs/class/corlib/System.Reflection/MonoModule.cs index 6edaf0de37c..25bde841e99 100644 --- a/mcs/class/corlib/System.Reflection/MonoModule.cs +++ b/mcs/class/corlib/System.Reflection/MonoModule.cs @@ -90,7 +90,7 @@ namespace System.Reflection { public override string FullyQualifiedName { get { -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.PathDiscovery, fqname).Demand (); } @@ -283,7 +283,7 @@ namespace System.Reflection { UnitySerializationHolder.GetUnitySerializationInfo (info, UnitySerializationHolder.ModuleUnity, this.ScopeName, this.GetRuntimeAssembly ()); } -#if !NET_2_1 +#if !MOBILE public override diff --git a/mcs/class/corlib/System.Reflection/MonoProperty.cs b/mcs/class/corlib/System.Reflection/MonoProperty.cs index 87310b19e2f..16f44ec583b 100644 --- a/mcs/class/corlib/System.Reflection/MonoProperty.cs +++ b/mcs/class/corlib/System.Reflection/MonoProperty.cs @@ -359,7 +359,7 @@ namespace System.Reflection { } getterType = getterDelegateType.MakeGenericType (typeVector); -#if NET_2_1 +#if MOBILE // with Silverlight a coreclr failure (e.g. Transparent caller creating a delegate on a Critical method) // would normally throw an ArgumentException, so we set throwOnBindFailure to false and check for a null // delegate that we can transform into a MethodAccessException diff --git a/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs b/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs index aff2ae187e6..bfa10d8b9cf 100644 --- a/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs +++ b/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs @@ -121,7 +121,7 @@ public class StrongNameKeyPair : ISerializable, IDeserializationCallback _keyPairArray = null; } } -#if !NET_2_1 +#if !MOBILE else if (_keyPairContainer != null) { CspParameters csp = new CspParameters (); csp.KeyContainerName = _keyPairContainer; diff --git a/mcs/class/corlib/System.Reflection/TargetException.cs b/mcs/class/corlib/System.Reflection/TargetException.cs index bd5e9010c2e..5c5c69e4e9f 100644 --- a/mcs/class/corlib/System.Reflection/TargetException.cs +++ b/mcs/class/corlib/System.Reflection/TargetException.cs @@ -37,7 +37,7 @@ namespace System.Reflection { [ComVisible (true)] [Serializable] -#if NET_2_1 +#if MOBILE public class TargetException : Exception { #else public class TargetException : ApplicationException { diff --git a/mcs/class/corlib/System.Reflection/TargetInvocationException.cs b/mcs/class/corlib/System.Reflection/TargetInvocationException.cs index 345368f7995..5f56432a852 100644 --- a/mcs/class/corlib/System.Reflection/TargetInvocationException.cs +++ b/mcs/class/corlib/System.Reflection/TargetInvocationException.cs @@ -36,7 +36,7 @@ namespace System.Reflection { [ComVisible (true)] [Serializable] -#if NET_2_1 +#if MOBILE public sealed class TargetInvocationException : Exception { #else public sealed class TargetInvocationException : ApplicationException { diff --git a/mcs/class/corlib/System.Reflection/TargetParameterCountException.cs b/mcs/class/corlib/System.Reflection/TargetParameterCountException.cs index deb5344e157..8b6c2b218e7 100644 --- a/mcs/class/corlib/System.Reflection/TargetParameterCountException.cs +++ b/mcs/class/corlib/System.Reflection/TargetParameterCountException.cs @@ -37,7 +37,7 @@ namespace System.Reflection { [ComVisible (true)] [Serializable] -#if NET_2_1 +#if MOBILE public sealed class TargetParameterCountException : Exception { #else public sealed class TargetParameterCountException : ApplicationException { diff --git a/mcs/class/corlib/System.Runtime.InteropServices/_Assembly.cs b/mcs/class/corlib/System.Runtime.InteropServices/_Assembly.cs index a30e29ce22d..c8b640e10b5 100644 --- a/mcs/class/corlib/System.Runtime.InteropServices/_Assembly.cs +++ b/mcs/class/corlib/System.Runtime.InteropServices/_Assembly.cs @@ -87,7 +87,7 @@ namespace System.Runtime.InteropServices string Location { get; } -#if !NET_2_1 +#if !MOBILE Evidence Evidence { get; } #endif @@ -129,7 +129,7 @@ namespace System.Runtime.InteropServices AssemblyName[] GetReferencedAssemblies (); -#if !NET_2_1 +#if !MOBILE bool GlobalAssemblyCache { get; } #endif diff --git a/mcs/class/corlib/System.Runtime.Remoting.Activation/ActivationServices.cs b/mcs/class/corlib/System.Runtime.Remoting.Activation/ActivationServices.cs index 71f1269b285..57094710db8 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Activation/ActivationServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting.Activation/ActivationServices.cs @@ -213,7 +213,7 @@ namespace System.Runtime.Remoting.Activation if (type.IsContextful) return RemotingServices.CreateClientProxyForContextBound (type, null); -#if !NET_2_1 +#if !MOBILE if (type.IsCOMObject) { return RemotingServices.CreateClientProxyForComInterop (type); } diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs index 1b35fe1ee90..d2b99281c3b 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs @@ -581,7 +581,7 @@ namespace System.Runtime.Remoting RemotingProxy proxy = new RemotingProxy (type, ChannelServices.CrossContextUrl, activationAttributes); return proxy.GetTransparentProxy(); } -#if !NET_2_1 +#if !MOBILE internal static object CreateClientProxyForComInterop (Type type) { Mono.Interop.ComInteropProxy proxy = Mono.Interop.ComInteropProxy.CreateProxy (type); diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs index 135b270e508..46398d8561d 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs @@ -48,7 +48,7 @@ namespace System.Security.Cryptography.X509Certificates { // and/or Authenticode certs. However this class works with older // X509v1 certificates and non-authenticode (code signing) certs. [Serializable] -#if NET_2_1 +#if MOBILE public partial class X509Certificate { #else public partial class X509Certificate : IDeserializationCallback, ISerializable { diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs index 42fca5acade..3467dc8038e 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs @@ -37,7 +37,7 @@ namespace System.Security.Cryptography.X509Certificates { enum X509ContentType { Unknown, Cert, - // not supported by Silverlight 2.0 (NET_2_1) + // not supported by Silverlight 2.0 (MOBILE) SerializedCert, Pfx, SerializedStore, diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.cs index c12fa6229cf..8bdd3db4daa 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.cs @@ -32,7 +32,7 @@ using System; using System.Text; using System.Threading; using System.Runtime.InteropServices; -#if !NET_2_1 +#if !MOBILE using System.Security.Permissions; #endif using MX = Mono.Security.X509; @@ -49,7 +49,7 @@ namespace System.Security.Cryptography.X509Certificates Interlocked.CompareExchange (ref nativeHelper, helper, null); } -#if !NET_2_1 +#if !MOBILE // typedef struct _CERT_CONTEXT { // DWORD dwCertEncodingType; // BYTE *pbCertEncoded; diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs index ce375c2aeac..9d4c2864150 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs @@ -35,7 +35,7 @@ namespace System.Security.Cryptography.X509Certificates { [ComVisible (true)] public enum X509KeyStorageFlags { DefaultKeySet = 0, - // not supported by Silverlight 2.0 (NET_2_1) + // not supported by Silverlight 2.0 (MOBILE) UserKeySet = 1, MachineKeySet = 2, Exportable = 4, diff --git a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs index 29e40efbadf..8a98c9d5ad8 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs @@ -40,7 +40,7 @@ using System.Text; namespace System.Security.Cryptography { -#if !NET_2_1 +#if !MOBILE [ComVisible (true)] #endif public sealed class RNGCryptoServiceProvider : RandomNumberGenerator { @@ -58,7 +58,7 @@ namespace System.Security.Cryptography { _handle = RngInitialize (null); Check (); } -#if !NET_2_1 +#if !MOBILE public RNGCryptoServiceProvider (byte[] rgb) { _handle = RngInitialize (rgb); diff --git a/mcs/class/corlib/System.Security.Permissions/CodeAccessSecurityAttribute.cs b/mcs/class/corlib/System.Security.Permissions/CodeAccessSecurityAttribute.cs index 5714862cbde..05f56decf4a 100644 --- a/mcs/class/corlib/System.Security.Permissions/CodeAccessSecurityAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/CodeAccessSecurityAttribute.cs @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; namespace System.Security.Permissions { -#if NET_2_1 && !MONOTOUCH +#if MOBILE && !MONOTOUCH [Obsolete ("CAS support is not available with Silverlight applications.")] #endif [ComVisible (true)] diff --git a/mcs/class/corlib/System.Security.Permissions/EnvironmentPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/EnvironmentPermissionAttribute.cs index 3e1c714e375..d943508a991 100644 --- a/mcs/class/corlib/System.Security.Permissions/EnvironmentPermissionAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/EnvironmentPermissionAttribute.cs @@ -71,7 +71,7 @@ namespace System.Security.Permissions { // Methods public override IPermission CreatePermission () { -#if NET_2_1 +#if MOBILE return null; #else EnvironmentPermission perm = null; diff --git a/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs index 5f7fbff2d86..3a3250d47dd 100644 --- a/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs @@ -120,7 +120,7 @@ namespace System.Security.Permissions { // Methods public override IPermission CreatePermission () { -#if NET_2_1 +#if MOBILE return null; #else FileIOPermission perm = null; diff --git a/mcs/class/corlib/System.Security.Permissions/HostProtectionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/HostProtectionAttribute.cs index dd7aa04d3d8..3afcb62ede4 100644 --- a/mcs/class/corlib/System.Security.Permissions/HostProtectionAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/HostProtectionAttribute.cs @@ -175,7 +175,7 @@ namespace System.Security.Permissions { public override IPermission CreatePermission () { -#if NET_2_1 +#if MOBILE return null; #else // looks like permission is internal diff --git a/mcs/class/corlib/System.Security.Permissions/PermissionSetAttribute.cs b/mcs/class/corlib/System.Security.Permissions/PermissionSetAttribute.cs index 3e8381721bb..aa6999b8a22 100644 --- a/mcs/class/corlib/System.Security.Permissions/PermissionSetAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/PermissionSetAttribute.cs @@ -90,7 +90,7 @@ namespace System.Security.Permissions { private PermissionSet CreateFromXml (string xml) { -#if !NET_2_1 +#if !MOBILE SecurityParser sp = new SecurityParser (); try { sp.LoadXml (xml); @@ -125,7 +125,7 @@ namespace System.Security.Permissions { public PermissionSet CreatePermissionSet () { PermissionSet pset = null; -#if !NET_2_1 +#if !MOBILE if (this.Unrestricted) pset = new PermissionSet (PermissionState.Unrestricted); else { diff --git a/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs index 68d85e81064..86801395279 100644 --- a/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs @@ -113,7 +113,7 @@ namespace System.Security.Permissions { // Methods public override IPermission CreatePermission () { -#if NET_2_1 +#if MOBILE return null; #else ReflectionPermission perm = null; diff --git a/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs b/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs index 94d14df749a..2af0d262aea 100644 --- a/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs +++ b/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs @@ -35,7 +35,7 @@ using System.Runtime.InteropServices; namespace System.Security.Permissions { -#if NET_2_1 && !MONOTOUCH +#if MOBILE && !MONOTOUCH [Obsolete ("CAS support is not available with Silverlight applications.")] #endif [ComVisible (true)] diff --git a/mcs/class/corlib/System.Security.Permissions/SecurityAttribute.cs b/mcs/class/corlib/System.Security.Permissions/SecurityAttribute.cs index f871175e423..276a9144396 100644 --- a/mcs/class/corlib/System.Security.Permissions/SecurityAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/SecurityAttribute.cs @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; namespace System.Security.Permissions { -#if NET_2_1 && !MONOTOUCH +#if MOBILE && !MONOTOUCH [Obsolete ("CAS support is not available with Silverlight applications.")] #endif [ComVisible (true)] diff --git a/mcs/class/corlib/System.Security.Permissions/SecurityPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/SecurityPermissionAttribute.cs index cf37722731b..3cdc150e8d9 100644 --- a/mcs/class/corlib/System.Security.Permissions/SecurityPermissionAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/SecurityPermissionAttribute.cs @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; namespace System.Security.Permissions { -#if NET_2_1 && !MONOTOUCH +#if MOBILE && !MONOTOUCH [Obsolete ("CAS support is not available with Silverlight applications.")] #endif [ComVisible (true)] @@ -251,7 +251,7 @@ namespace System.Security.Permissions { public override IPermission CreatePermission () { -#if NET_2_1 +#if MOBILE return null; #else SecurityPermission perm = null; diff --git a/mcs/class/corlib/System.Security.Permissions/SecurityPermissionFlag.cs b/mcs/class/corlib/System.Security.Permissions/SecurityPermissionFlag.cs index 9e5517bd406..f5c246e6b02 100644 --- a/mcs/class/corlib/System.Security.Permissions/SecurityPermissionFlag.cs +++ b/mcs/class/corlib/System.Security.Permissions/SecurityPermissionFlag.cs @@ -34,7 +34,7 @@ using System.Runtime.InteropServices; namespace System.Security.Permissions { -#if NET_2_1 && !MONOTOUCH +#if MOBILE && !MONOTOUCH [Obsolete ("CAS support is not available with Silverlight applications.")] #endif [ComVisible (true)] diff --git a/mcs/class/corlib/System.Security.Permissions/StrongNamePermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/StrongNamePermissionAttribute.cs index c710c3d764b..52a120d4909 100644 --- a/mcs/class/corlib/System.Security.Permissions/StrongNamePermissionAttribute.cs +++ b/mcs/class/corlib/System.Security.Permissions/StrongNamePermissionAttribute.cs @@ -70,7 +70,7 @@ namespace System.Security.Permissions { // Methods public override IPermission CreatePermission () { -#if NET_2_1 +#if MOBILE return null; #else if (this.Unrestricted) diff --git a/mcs/class/corlib/System.Security.Policy/Evidence.cs b/mcs/class/corlib/System.Security.Policy/Evidence.cs index 307c9d788a3..66e6bec14e5 100644 --- a/mcs/class/corlib/System.Security.Policy/Evidence.cs +++ b/mcs/class/corlib/System.Security.Policy/Evidence.cs @@ -225,7 +225,7 @@ namespace System.Security.Policy { // "possible" presence of an Authenticode signature [MethodImplAttribute (MethodImplOptions.InternalCall)] static extern bool IsAuthenticodePresent (Assembly a); -#if NET_2_1 +#if MOBILE static internal Evidence GetDefaultHostEvidence (Assembly a) { return new Evidence (); @@ -287,7 +287,7 @@ namespace System.Security.Policy { return e; } -#endif // NET_2_1 +#endif // MOBILE private class EvidenceEnumerator : IEnumerator { diff --git a/mcs/class/corlib/System.Security.Policy/Evidence_2_1.cs b/mcs/class/corlib/System.Security.Policy/Evidence_2_1.cs index 470b4086139..43ef3622021 100644 --- a/mcs/class/corlib/System.Security.Policy/Evidence_2_1.cs +++ b/mcs/class/corlib/System.Security.Policy/Evidence_2_1.cs @@ -31,7 +31,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_1 +#if MOBILE namespace System.Security.Policy { diff --git a/mcs/class/corlib/System.Security/SecurityManager.cs b/mcs/class/corlib/System.Security/SecurityManager.cs index 376e69998c9..c933e5e46b8 100644 --- a/mcs/class/corlib/System.Security/SecurityManager.cs +++ b/mcs/class/corlib/System.Security/SecurityManager.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; using System.Diagnostics; diff --git a/mcs/class/corlib/System.Threading/EventWaitHandle.cs b/mcs/class/corlib/System.Threading/EventWaitHandle.cs index fba21dc3ce5..0594eb1d8c5 100644 --- a/mcs/class/corlib/System.Threading/EventWaitHandle.cs +++ b/mcs/class/corlib/System.Threading/EventWaitHandle.cs @@ -221,7 +221,7 @@ namespace System.Threading disposed = true; } -#if !NET_2_1 +#if !MOBILE public void SetAccessControl (EventWaitHandleSecurity eventSecurity) { if (null == eventSecurity) diff --git a/mcs/class/corlib/System.Threading/Mutex.cs b/mcs/class/corlib/System.Threading/Mutex.cs index 6216e310137..9c88bce4d94 100644 --- a/mcs/class/corlib/System.Threading/Mutex.cs +++ b/mcs/class/corlib/System.Threading/Mutex.cs @@ -206,7 +206,7 @@ namespace System.Threading } } -#if !NET_2_1 +#if !MOBILE public void SetAccessControl (MutexSecurity mutexSecurity) { if (null == mutexSecurity) diff --git a/mcs/class/corlib/System/AppDomain.cs b/mcs/class/corlib/System/AppDomain.cs index 13cc078e575..76a637ea631 100644 --- a/mcs/class/corlib/System/AppDomain.cs +++ b/mcs/class/corlib/System/AppDomain.cs @@ -116,7 +116,7 @@ namespace System { [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern AppDomainSetup getSetup (); -#if NET_2_1 +#if MOBILE internal #endif AppDomainSetup SetupInformationNoCopy { @@ -130,7 +130,7 @@ namespace System { } } -#if !NET_2_1 +#if !MOBILE [MonoTODO] public ApplicationTrust ApplicationTrust { get { throw new NotImplementedException (); } @@ -139,7 +139,7 @@ namespace System { public string BaseDirectory { get { string path = SetupInformationNoCopy.ApplicationBase; -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled && (path != null) && (path.Length > 0)) { // we cannot divulge local file informations new FileIOPermission (FileIOPermissionAccess.PathDiscovery, path).Demand (); @@ -152,7 +152,7 @@ namespace System { public string RelativeSearchPath { get { string path = SetupInformationNoCopy.PrivateBinPath; -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled && (path != null) && (path.Length > 0)) { // we cannot divulge local file informations new FileIOPermission (FileIOPermissionAccess.PathDiscovery, path).Demand (); @@ -169,7 +169,7 @@ namespace System { return null; string path = Path.Combine (setup.DynamicBase, setup.ApplicationName); -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled && (path != null) && (path.Length > 0)) { // we cannot divulge local file informations new FileIOPermission (FileIOPermissionAccess.PathDiscovery, path).Demand (); @@ -311,7 +311,7 @@ namespace System { SetupInformationNoCopy.ShadowCopyDirectories = String.Empty; } -#if !NET_2_1 +#if !MOBILE public ObjectHandle CreateComInstanceFrom (string assemblyName, string typeName) { return Activator.CreateComInstanceFrom (assemblyName, typeName); @@ -1027,7 +1027,7 @@ namespace System { } else if (info.ConfigurationFile == null) info.ConfigurationFile = "[I don't have a config file]"; -#if !NET_2_1 +#if !MOBILE if (info.AppDomainInitializer != null) { if (!info.AppDomainInitializer.Method.IsStatic) throw new ArgumentException ("Non-static methods cannot be invoked as an appdomain initializer"); @@ -1047,7 +1047,7 @@ namespace System { else ad._evidence = new Evidence (securityInfo); // copy -#if !NET_2_1 +#if !MOBILE if (info.AppDomainInitializer != null) { Loader loader = new Loader ( info.AppDomainInitializer.Method.DeclaringType.Assembly.Location); @@ -1082,7 +1082,7 @@ namespace System { } #endif // MONO_FEATURE_MULTIPLE_APPDOMAINS -#if !NET_2_1 +#if !MOBILE [Serializable] class Loader { @@ -1133,7 +1133,7 @@ namespace System { } #endif // MONO_FEATURE_MULTIPLE_APPDOMAINS -#if !NET_2_1 +#if !MOBILE #if MONO_FEATURE_MULTIPLE_APPDOMAINS public static AppDomain CreateDomain (string friendlyName, Evidence securityInfo, AppDomainSetup info, PermissionSet grantSet, params StrongName [] fullTrustAssemblies) @@ -1217,14 +1217,14 @@ namespace System { SetData (name, data); } -#if !NET_2_1 +#if !MOBILE [Obsolete ("Use AppDomainSetup.DynamicBase")] [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)] public void SetDynamicBase (string path) { SetupInformationNoCopy.DynamicBase = path; } -#endif // !NET_2_1 +#endif // !MOBILE [Obsolete ("AppDomain.GetCurrentThreadId has been deprecated" + " because it does not provide a stable Id when managed" @@ -1286,7 +1286,7 @@ namespace System { private Assembly DoAssemblyResolve (string name, Assembly requestingAssembly, bool refonly) { ResolveEventHandler del; -#if !NET_2_1 +#if !MOBILE if (refonly) del = ReflectionOnlyAssemblyResolve; else diff --git a/mcs/class/corlib/System/AppDomainManager_2_1.cs b/mcs/class/corlib/System/AppDomainManager_2_1.cs index cc45ffd33de..f71ed54da60 100644 --- a/mcs/class/corlib/System/AppDomainManager_2_1.cs +++ b/mcs/class/corlib/System/AppDomainManager_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 using System.Runtime.InteropServices; using System.Security; diff --git a/mcs/class/corlib/System/AppDomainSetup.cs b/mcs/class/corlib/System/AppDomainSetup.cs index b3e2d510138..c1865f34bd3 100644 --- a/mcs/class/corlib/System/AppDomainSetup.cs +++ b/mcs/class/corlib/System/AppDomainSetup.cs @@ -47,7 +47,7 @@ namespace System [ClassInterface (ClassInterfaceType.None)] [ComVisible (true)] [StructLayout (LayoutKind.Sequential)] -#if NET_2_1 +#if MOBILE public sealed class AppDomainSetup #else public sealed class AppDomainSetup : IAppDomainSetup diff --git a/mcs/class/corlib/System/CStreamReader.cs b/mcs/class/corlib/System/CStreamReader.cs index 730b67a73f1..8e51aed8361 100644 --- a/mcs/class/corlib/System/CStreamReader.cs +++ b/mcs/class/corlib/System/CStreamReader.cs @@ -29,7 +29,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.Text; using System.Runtime.InteropServices; diff --git a/mcs/class/corlib/System/CStreamWriter.cs b/mcs/class/corlib/System/CStreamWriter.cs index 5eaa353dc6c..ff6fc63a25a 100644 --- a/mcs/class/corlib/System/CStreamWriter.cs +++ b/mcs/class/corlib/System/CStreamWriter.cs @@ -31,7 +31,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; using System.Text; diff --git a/mcs/class/corlib/System/Console.cs b/mcs/class/corlib/System/Console.cs index 2e7c4f4531c..6a43f9cd808 100644 --- a/mcs/class/corlib/System/Console.cs +++ b/mcs/class/corlib/System/Console.cs @@ -41,7 +41,7 @@ namespace System { public static partial class Console { -#if !NET_2_1 +#if !MOBILE private class WindowsConsole { public static bool ctrlHandlerAdded = false; @@ -100,7 +100,7 @@ namespace System // // On Windows, follow the Windows tradition // -#if NET_2_1 +#if MOBILE // should never happen since Moonlight does not run on windows inputEncoding = outputEncoding = Encoding.Default; #else @@ -134,7 +134,7 @@ namespace System static void SetupStreams (Encoding inputEncoding, Encoding outputEncoding) { -#if !NET_2_1 +#if !MOBILE if (!Environment.IsRunningOnWindows && ConsoleDriver.IsConsole) { stdin = new CStreamReader (OpenStandardInput (0), inputEncoding); stdout = TextWriter.Synchronized (new CStreamWriter (OpenStandardOutput (0), outputEncoding, true) { AutoFlush = true }); @@ -488,7 +488,7 @@ namespace System stdout.WriteLine (String.Format (format, args)); } -#if !NET_2_1 +#if !MOBILE public static int Read () { if ((stdin is CStreamReader) && ConsoleDriver.IsConsole) { @@ -539,7 +539,7 @@ namespace System } } -#if !NET_2_1 +#if !MOBILE public static ConsoleColor BackgroundColor { get { return ConsoleDriver.BackgroundColor; } set { ConsoleDriver.BackgroundColor = value; } diff --git a/mcs/class/corlib/System/ConsoleDriver.cs b/mcs/class/corlib/System/ConsoleDriver.cs index cf1faa8da10..07354a9aeb6 100644 --- a/mcs/class/corlib/System/ConsoleDriver.cs +++ b/mcs/class/corlib/System/ConsoleDriver.cs @@ -27,7 +27,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.IO; using System.Runtime.CompilerServices; diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs index b6a2d92eef7..4bd15db01a2 100644 --- a/mcs/class/corlib/System/Environment.cs +++ b/mcs/class/corlib/System/Environment.cs @@ -322,7 +322,7 @@ namespace System { return trace.ToString (); } } -#if !NET_2_1 +#if !MOBILE /// /// Get a fully qualified path to the system directory /// @@ -480,7 +480,7 @@ namespace System { /// public static string GetEnvironmentVariable (string variable) { -#if !NET_2_1 +#if !MOBILE if (SecurityManager.SecurityEnabled) { new EnvironmentPermission (EnvironmentPermissionAccess.Read, variable).Demand (); } @@ -503,7 +503,7 @@ namespace System { /// /// Return a set of all environment variables and their values /// -#if !NET_2_1 +#if !MOBILE public static IDictionary GetEnvironmentVariables () { StringBuilder sb = null; @@ -565,7 +565,7 @@ namespace System { else dir = UnixGetFolderPath (folder, option); -#if !NET_2_1 +#if !MOBILE if ((dir != null) && (dir.Length > 0) && SecurityManager.SecurityEnabled) { new FileIOPermission (FileIOPermissionAccess.PathDiscovery, dir).Demand (); } @@ -927,7 +927,7 @@ namespace System { } #endif -#if !NET_2_1 +#if !MOBILE // // Used by gacutil.exe // diff --git a/mcs/class/corlib/System/NullConsoleDriver.cs b/mcs/class/corlib/System/NullConsoleDriver.cs index ecec3b508b2..09cba85976a 100644 --- a/mcs/class/corlib/System/NullConsoleDriver.cs +++ b/mcs/class/corlib/System/NullConsoleDriver.cs @@ -26,7 +26,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; using System.Text; namespace System { diff --git a/mcs/class/corlib/System/Nullable.cs b/mcs/class/corlib/System/Nullable.cs index 11f6c67dbd4..32c4aa0885b 100644 --- a/mcs/class/corlib/System/Nullable.cs +++ b/mcs/class/corlib/System/Nullable.cs @@ -41,7 +41,7 @@ namespace System [ComVisible (true)] public static class Nullable { -#if NET_2_1 +#if MOBILE [ComVisible (false)] #endif public static int Compare (T? n1, T? n2) where T: struct @@ -56,7 +56,7 @@ namespace System return n2.has_value ? -1 : 0; } -#if NET_2_1 +#if MOBILE [ComVisible (false)] #endif public static bool Equals (T? n1, T? n2) where T: struct diff --git a/mcs/class/corlib/System/TermInfoDriver.cs b/mcs/class/corlib/System/TermInfoDriver.cs index 5ab662ab061..ff6cc88a809 100644 --- a/mcs/class/corlib/System/TermInfoDriver.cs +++ b/mcs/class/corlib/System/TermInfoDriver.cs @@ -33,7 +33,7 @@ // https://github.com/dotnet/corefx // src/System.Console/src/System/ConsolePal.Unix.cs // -#if !NET_2_1 +#if !MOBILE // // Defining this writes the output to console.log diff --git a/mcs/class/corlib/System/TermInfoNumbers.cs b/mcs/class/corlib/System/TermInfoNumbers.cs index fb547d4f58c..b0b89f225c0 100644 --- a/mcs/class/corlib/System/TermInfoNumbers.cs +++ b/mcs/class/corlib/System/TermInfoNumbers.cs @@ -27,7 +27,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 // These values are taken from 'man 5 terminfo' and /usr/include/term.h. // They are the indexes for the numeric capabilities in a terminfo file. diff --git a/mcs/class/corlib/System/TermInfoReader.cs b/mcs/class/corlib/System/TermInfoReader.cs index 6424d4fb79a..1a1ec6a9422 100644 --- a/mcs/class/corlib/System/TermInfoReader.cs +++ b/mcs/class/corlib/System/TermInfoReader.cs @@ -27,7 +27,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.IO; using System.Text; namespace System { diff --git a/mcs/class/corlib/System/TermInfoStrings.cs b/mcs/class/corlib/System/TermInfoStrings.cs index 4baa2793d81..d795ef91adc 100644 --- a/mcs/class/corlib/System/TermInfoStrings.cs +++ b/mcs/class/corlib/System/TermInfoStrings.cs @@ -27,7 +27,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 // These values are taken from 'man 5 terminfo' and /usr/include/term.h. // They are the indexes for the string capabilities in a terminfo file. diff --git a/mcs/class/corlib/System/TimeZoneInfo.cs b/mcs/class/corlib/System/TimeZoneInfo.cs index ff76486877c..1b070928c55 100644 --- a/mcs/class/corlib/System/TimeZoneInfo.cs +++ b/mcs/class/corlib/System/TimeZoneInfo.cs @@ -273,7 +273,7 @@ namespace System #endif private AdjustmentRule [] adjustmentRules; -#if !NET_2_1 || MOBILE_STATIC +#if !MOBILE || MOBILE_STATIC /// /// Determine whether windows of not (taken Stephane Delcroix's code) /// @@ -531,7 +531,7 @@ namespace System //FIXME: this method should check for cached values in systemTimeZones if (id == null) throw new ArgumentNullException ("id"); -#if !NET_2_1 +#if !MOBILE if (TimeZoneKey != null) { if (id == "Coordinated Universal Time") @@ -561,7 +561,7 @@ namespace System } #endif -#if !NET_2_1 +#if !MOBILE private static TimeZoneInfo FromRegistryKey (string id, RegistryKey key) { byte [] reg_tzi = (byte []) key.GetValue ("TZI"); diff --git a/mcs/class/corlib/System/WeakReference.cs b/mcs/class/corlib/System/WeakReference.cs index 7ba2a7abd4c..cfbb19afb34 100644 --- a/mcs/class/corlib/System/WeakReference.cs +++ b/mcs/class/corlib/System/WeakReference.cs @@ -54,7 +54,7 @@ namespace System } //Constructors -#if NET_2_1 +#if MOBILE protected WeakReference () { } diff --git a/mcs/class/corlib/System/WindowsConsoleDriver.cs b/mcs/class/corlib/System/WindowsConsoleDriver.cs index 2e8b643e334..10ba8db45e5 100755 --- a/mcs/class/corlib/System/WindowsConsoleDriver.cs +++ b/mcs/class/corlib/System/WindowsConsoleDriver.cs @@ -26,7 +26,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; using System.Text; namespace System { diff --git a/mcs/class/corlib/System/_AppDomain.cs b/mcs/class/corlib/System/_AppDomain.cs index 37c71de14bf..8cadc0f3313 100644 --- a/mcs/class/corlib/System/_AppDomain.cs +++ b/mcs/class/corlib/System/_AppDomain.cs @@ -159,7 +159,7 @@ namespace System [method: SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)] event UnhandledExceptionEventHandler UnhandledException; -#if !NET_2_1 +#if !MOBILE void GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); void GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo); diff --git a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs index 66eb27ed324..474a3bba20c 100644 --- a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs +++ b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs @@ -124,7 +124,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly (); Assert.AreEqual (Int64.MaxValue, isf.MaximumSize, "MaximumSize"); Assert.AreEqual (IsolatedStorageScope.User | IsolatedStorageScope.Assembly, isf.Scope, "Scope"); -#if !NET_2_1 +#if !MOBILE Assert.IsTrue ((isf.AssemblyIdentity is Url), "AssemblyIdentity"); // note: mono transforms the CodeBase into uppercase // for net 1.1 which uses file:// and not file:/// @@ -157,7 +157,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForDomain (); Assert.AreEqual (Int64.MaxValue, isf.MaximumSize, "MaximumSize"); Assert.AreEqual (IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly, isf.Scope, "Scope"); -#if !NET_2_1 +#if !MOBILE Assert.IsTrue ((isf.AssemblyIdentity is Url), "AssemblyIdentity"); // note: mono transforms the CodeBase into uppercase // for net 1.1 which uses file:// and not file:/// @@ -198,7 +198,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { { IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication (); Assert.AreEqual (Int64.MaxValue, isf.MaximumSize, "MaximumSize"); -#if !NET_2_1 +#if !MOBILE Assert.AreEqual (IsolatedStorageScope.User | IsolatedStorageScope.Assembly, isf.Scope, "Scope"); Assert.IsTrue ((isf.AssemblyIdentity is Url), "AssemblyIdentity"); Assert.IsTrue ((isf.AssemblyIdentity.ToString ().IndexOf (Assembly.GetExecutingAssembly ().CodeBase) > 0), "Url"); @@ -206,7 +206,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { Assert.IsTrue ((isf.CurrentSize >= 0), "CurrentSize"); } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (IsolatedStorageException))] public void GetUserStoreForApplication_AssemblyIdentity () @@ -238,7 +238,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly; IsolatedStorageFile isf = IsolatedStorageFile.GetStore (scope, typeof (Zone), typeof (Zone)); Assert.AreEqual (Int64.MaxValue, isf.MaximumSize, "MaximumSize"); -#if !NET_2_1 +#if !MOBILE Assert.AreEqual (IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly, isf.Scope, "Scope"); Assert.IsTrue ((isf.AssemblyIdentity is Zone), "AssemblyIdentity"); Assert.IsTrue ((isf.AssemblyIdentity.ToString ().IndexOf ("MyComputer") > 0), "Zone - Assembly"); @@ -265,7 +265,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { IsolatedStorageFile isf = IsolatedStorageFile.GetStore (scope, typeof (StrongName), typeof (Url)); Assert.AreEqual (Int64.MaxValue, isf.MaximumSize, "MaximumSize"); Assert.AreEqual (scope, isf.Scope, "Scope"); -#if !NET_2_1 +#if !MOBILE Assert.IsTrue ((isf.AssemblyIdentity is Url), "AssemblyIdentity"); // note: mono transforms the CodeBase into uppercase // for net 1.1 which uses file:// and not file:/// @@ -361,7 +361,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { // Maximum size for Internet isn't (by default) Int64.MaxValue Assert.AreEqual (scope, isf.Scope, "Scope"); -#if !NET_2_1 +#if !MOBILE Assert.IsTrue ((isf.AssemblyIdentity is Zone), "AssemblyIdentity"); Assert.IsTrue ((isf.AssemblyIdentity.ToString ().IndexOf ("Intranet") > 0), "Zone - Assembly"); Assert.IsTrue ((isf.DomainIdentity is Zone), "DomainIdentity"); @@ -577,7 +577,7 @@ namespace MonoTests.System.IO.IsolatedStorageTest { { IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Roaming | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain; IsolatedStorageFile isf = IsolatedStorageFile.GetStore (scope, null, null); -#if !NET_2_1 +#if !MOBILE Assert.AreEqual (typeof (Url), isf.AssemblyIdentity.GetType (), "AssemblyIdentity"); Assert.AreEqual (typeof (Url), isf.DomainIdentity.GetType (), "DomainIdentity"); #endif diff --git a/mcs/class/corlib/Test/System.IO/FileStreamSafeHandleTest.cs b/mcs/class/corlib/Test/System.IO/FileStreamSafeHandleTest.cs index bd114bb5fb4..3800701e328 100644 --- a/mcs/class/corlib/Test/System.IO/FileStreamSafeHandleTest.cs +++ b/mcs/class/corlib/Test/System.IO/FileStreamSafeHandleTest.cs @@ -17,7 +17,7 @@ namespace MonoTests.System.IO [TestFixture] public class FileStreamWithClosedSafeHandleTests { -#if !NET_2_1 +#if !MOBILE private FileStream GetFileStreamWithClosedHandle () { var fs1 = new FileStream ("test2", FileMode.OpenOrCreate); diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs index c14a6c388f2..e40d8ef72dc 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs @@ -656,7 +656,7 @@ namespace MonoTests.System.Reflection.Emit Assert.AreEqual ("FOO", ((ObsoleteAttribute) attrs [0]).Message, "#B3"); } } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (InvalidOperationException))] public void TestAddDeclarativeSecurityAlreadyCreated () diff --git a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs index d31b99fa495..c6451207442 100644 --- a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs @@ -71,7 +71,7 @@ namespace MonoTests.System.Reflection.Emit #if !MOBILE Assert.AreEqual ("foo.type[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", inst.FullName, "#3"); Assert.AreEqual ("foo.type[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], MonoTests.System.Reflection.Emit.MonoGenericClassTest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", inst.AssemblyQualifiedName, "#4"); -#elif NET_2_1 || MOBILE +#elif MOBILE || MOBILE Assert.AreEqual ("foo.type[[System.Double, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]", inst.FullName, "#3"); Assert.AreEqual ("foo.type[[System.Double, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], MonoTests.System.Reflection.Emit.MonoGenericClassTest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", inst.AssemblyQualifiedName, "#4"); Assert.AreEqual ("foo.type[System.Double,System.String]", inst.ToString (), "#5"); diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs index 8d5fc3a9212..406b569c8d4 100644 --- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs @@ -73,7 +73,7 @@ namespace MonoTests.System.Reflection } } -#if !NET_2_1 +#if !MOBILE public enum ParamEnum { None = 0, Foo = 1, diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs index 4c38e08ed56..d0acc240428 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs @@ -671,7 +671,7 @@ namespace MonoTests.System.Runtime.InteropServices } } -#if !NET_2_1 +#if !MOBILE [Test] public void TestGetComSlotForMethodInfo () { @@ -819,7 +819,7 @@ namespace MonoTests.System.Runtime.InteropServices ); #endif } -#if !NET_2_1 +#if !MOBILE [ComImport()] [Guid("AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA")] interface ITestDefault diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentTest.cs index 660a556c184..832ac6fc1cc 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentTest.cs @@ -58,7 +58,7 @@ namespace MonoTests.System.Runtime.InteropServices { [Test] #if MOBILE - [Ignore ("There's no GAC for the NET_2_1 based profiles (Moonlight, MonoTouch and Mono for Android")] + [Ignore ("There's no GAC for the MOBILE based profiles (Moonlight, MonoTouch and Mono for Android")] #endif public void FromGlobalAccessCache () { diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs index 328bbb54a50..efbc57018e6 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs @@ -104,8 +104,8 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } [Test] -#if NET_2_1 - [Ignore ("This constructor always throw a NotSupportedException under NET_2_1 and is useless without CryptoAPI (i.e. outside Windows)")] +#if MOBILE + [Ignore ("This constructor always throw a NotSupportedException under MOBILE and is useless without CryptoAPI (i.e. outside Windows)")] #endif public void ConstructorIntPtr () { diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs index e141fa9e90f..2c3cf5d2227 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs @@ -137,7 +137,7 @@ public class CryptoConfigTest { // additional names (URL) used for XMLDSIG (System.Security.Cryptography.Xml) // URL taken from http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ [Test] -#if NET_2_1 +#if MOBILE [Ignore ("System.Security.dll is not part of Moonlight, MonoTouch and Mono for Android")] #endif public void CreateFromURL () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs index 7f3320e9c92..7f3790421f6 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs @@ -324,7 +324,7 @@ namespace MonoTests.System.Security.Cryptography { } } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (NotSupportedException))] public void Read_Disposed_Break () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs index a609ce74e2d..e56a20c75cd 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs @@ -857,7 +857,7 @@ public class DSACryptoServiceProviderTest { } } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] public void CspKeyContainerInfo_NewKeypair () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs index cb689ea25ed..f5ba3ecf91b 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs @@ -345,7 +345,7 @@ public class HashAlgorithmTest { public virtual bool ManagedHashImplementation { get { return false; } } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // Mono nevers throws an exception (and we're all managed ;-) public void TransformFinalBlock_Twice () @@ -424,7 +424,7 @@ public class HashAlgorithmTest { { Assert.AreEqual (HashBuffer (false), HashBuffer (true), "Intersect"); } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (NullReferenceException))] [Category ("NotWorking")] // initialization problem ? fx2.0 only ? diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs index 31401da3fec..375512ecd52 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs @@ -79,7 +79,7 @@ public class PasswordDeriveBytesTest { PasswordDeriveBytes pdb = new PasswordDeriveBytes (pwd, salt, new CspParameters ()); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) public void Ctor_PasswordSaltNullCspParameters () @@ -100,7 +100,7 @@ public class PasswordDeriveBytesTest { Assert.AreEqual (ssalt, BitConverter.ToString (pdb.Salt), "Salt"); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) public void Ctor_PasswordSaltCspParameters () @@ -176,7 +176,7 @@ public class PasswordDeriveBytesTest { PasswordDeriveBytes pdb = new PasswordDeriveBytes (pwd, salt, "SHA1", 1, new CspParameters ()); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) public void Ctor_PasswordSaltNullHashIterationCspParameters () @@ -209,7 +209,7 @@ public class PasswordDeriveBytesTest { PasswordDeriveBytes pdb = new PasswordDeriveBytes ("s3kr3t", salt, "SHA1", 0, new CspParameters ()); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) public void Ctor_PasswordSaltHashIterationMaxValueCspParameters () @@ -230,7 +230,7 @@ public class PasswordDeriveBytesTest { Assert.AreEqual (ssalt, BitConverter.ToString (pdb.Salt), "Salt"); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) public void Ctor_PasswordSaltHashIterationCspParameters () @@ -669,7 +669,7 @@ public class PasswordDeriveBytesTest { pd.CryptDeriveKey ("AlgName", "MD5", -256, new byte [8]); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] // bug #79499 public void LongMultipleGetBytes () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RNGCryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RNGCryptoServiceProviderTest.cs index 6f351c4edd0..2ebcad4a366 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RNGCryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RNGCryptoServiceProviderTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { { _algo = new RNGCryptoServiceProvider (); } -#if !NET_2_1 +#if !MOBILE [Test] public void ConstructorByteArray () { diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs index 8a20b9add45..6e44e3235b2 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs @@ -420,7 +420,7 @@ public class RSACryptoServiceProviderTest { rsa.VerifyHash (hash, "1.3.14.3.2.26", null); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] public void ImportDisposed () @@ -1161,7 +1161,7 @@ public class RSACryptoServiceProviderTest { Assert.IsNotNull (r.Decrypt (bytes, true)); } -#if !NET_2_1 +#if !MOBILE [Test] [Category ("NotWorking")] public void CspKeyContainerInfo_NewKeypair () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RijndaelManagedTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RijndaelManagedTest.cs index b7bf46057a0..5a200bbfa36 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RijndaelManagedTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RijndaelManagedTest.cs @@ -277,7 +277,7 @@ namespace MonoTests.System.Security.Cryptography { CreateEncryptor_IV (size); } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (CryptographicException))] // Rijndael is the only implementation that has @@ -324,7 +324,7 @@ namespace MonoTests.System.Security.Cryptography { int size = (aes.BlockSize >> 3); CreateDecryptor_IV (size); } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (CryptographicException))] // Rijndael is the only implementation that has diff --git a/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs b/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs index 80336afc641..a420ffb5600 100644 --- a/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs +++ b/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs @@ -27,8 +27,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// NET_2_1 profile lacks some (of the few) CAS features required to execute those tests -#if !NET_2_1 +// MOBILE profile lacks some (of the few) CAS features required to execute those tests +#if !MOBILE using NUnit.Framework; using System; diff --git a/mcs/class/corlib/Test/System/EnvironmentTest.cs b/mcs/class/corlib/Test/System/EnvironmentTest.cs index fed370974e5..fb547931b23 100644 --- a/mcs/class/corlib/Test/System/EnvironmentTest.cs +++ b/mcs/class/corlib/Test/System/EnvironmentTest.cs @@ -138,7 +138,7 @@ namespace MonoTests.System Assert.IsFalse (d.IsSynchronized, "IsSynchronized"); } -#if !NET_2_1 +#if !MOBILE [Test] // bug #333740 public void GetEnvironmentVariables_NewlySet () { @@ -165,7 +165,7 @@ namespace MonoTests.System #endif } -#if !NET_2_1 +#if !MOBILE [Test] [ExpectedException (typeof (ArgumentException))] public void GetEnvironmentVariable_Target_Invalid () diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs index 37039f81ef4..3bcaf26e36f 100644 --- a/mcs/mcs/class.cs +++ b/mcs/mcs/class.cs @@ -22,7 +22,7 @@ using System.Text; using System.Diagnostics; using Mono.CompilerServices.SymbolWriter; -#if NET_2_1 +#if MOBILE using XmlElement = System.Object; #endif diff --git a/mcs/mcs/decl.cs b/mcs/mcs/decl.cs index 3f88a5935c0..340eb488ab0 100644 --- a/mcs/mcs/decl.cs +++ b/mcs/mcs/decl.cs @@ -18,7 +18,7 @@ using System.Diagnostics; using System.Text; using Mono.CompilerServices.SymbolWriter; -#if NET_2_1 +#if MOBILE using XmlElement = System.Object; #else using System.Xml; diff --git a/mcs/mcs/doc-bootstrap.cs b/mcs/mcs/doc-bootstrap.cs index 848dfc47fa4..ae60ff4031b 100644 --- a/mcs/mcs/doc-bootstrap.cs +++ b/mcs/mcs/doc-bootstrap.cs @@ -11,7 +11,7 @@ // // -#if BOOTSTRAP_WITH_OLDLIB || NET_2_1 +#if BOOTSTRAP_WITH_OLDLIB || MOBILE using XmlElement = System.Object; diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs index 62c02b1fd56..d4e83a506a0 100644 --- a/mcs/mcs/eval.cs +++ b/mcs/mcs/eval.cs @@ -1134,7 +1134,7 @@ namespace Mono.CSharp QuitRequested = true; } -#if !NET_2_1 +#if !MOBILE /// /// Describes an object or a type. /// diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs index e6213c7e43e..3adb36f327c 100644 --- a/mcs/mcs/method.cs +++ b/mcs/mcs/method.cs @@ -21,7 +21,7 @@ using System.Linq; using Mono.CompilerServices.SymbolWriter; using System.Runtime.CompilerServices; -#if NET_2_1 +#if MOBILE using XmlElement = System.Object; #else using System.Xml; diff --git a/mcs/mcs/property.cs b/mcs/mcs/property.cs index 94e9b6baf04..8036f2c1126 100644 --- a/mcs/mcs/property.cs +++ b/mcs/mcs/property.cs @@ -17,7 +17,7 @@ using System.Collections.Generic; using System.Text; using Mono.CompilerServices.SymbolWriter; -#if NET_2_1 +#if MOBILE using XmlElement = System.Object; #endif diff --git a/mcs/mcs/reflection.cs b/mcs/mcs/reflection.cs index 1210ae4221a..c7bcb479dbc 100644 --- a/mcs/mcs/reflection.cs +++ b/mcs/mcs/reflection.cs @@ -418,7 +418,7 @@ namespace Mono.CSharp default_references.Add ("System"); default_references.Add ("System.Xml"); -#if NET_2_1 +#if MOBILE default_references.Add ("System.Net"); default_references.Add ("System.Windows"); default_references.Add ("System.Windows.Browser"); diff --git a/mcs/tools/compiler-tester/compiler-tester.cs b/mcs/tools/compiler-tester/compiler-tester.cs index ec7e9dfc25a..265f702ab65 100644 --- a/mcs/tools/compiler-tester/compiler-tester.cs +++ b/mcs/tools/compiler-tester/compiler-tester.cs @@ -91,7 +91,7 @@ namespace TestRunner { } } -#if !NET_2_1 +#if !MOBILE class ProcessTester: ITester { ProcessStartInfo pi; @@ -734,7 +734,7 @@ namespace TestRunner { bool update_verif_file; Hashtable verif_data; -#if !NET_2_1 +#if !MOBILE ProcessStartInfo pi; #endif readonly string mono; @@ -756,7 +756,7 @@ namespace TestRunner { files_folder = Directory.GetCurrentDirectory (); this.verif_file = verif_file; -#if !NET_2_1 +#if !MOBILE pi = new ProcessStartInfo (); pi.CreateNoWindow = true; pi.WindowStyle = ProcessWindowStyle.Hidden; @@ -965,7 +965,7 @@ namespace TestRunner { string filename = test.FileName; AppDomain domain = null; -#if !NET_2_1 +#if !MOBILE if (safe_execution) { // Create a new AppDomain, with the current directory as the base. AppDomainSetup setupInfo = new AppDomainSetup (); @@ -977,7 +977,7 @@ namespace TestRunner { try { DomainTester tester; try { -#if !NET_2_1 +#if !MOBILE if (domain != null) tester = (DomainTester) domain.CreateInstanceAndUnwrap (typeof (PositiveChecker).Assembly.FullName, typeof (DomainTester).FullName); else @@ -998,7 +998,7 @@ namespace TestRunner { if (doc_output != null) { string ref_file = filename.Replace (".cs", "-ref.xml"); try { -#if !NET_2_1 +#if !MOBILE new XmlComparer ("doc").Compare (ref_file, doc_output); #endif } catch (Exception e) { diff --git a/mcs/tools/compiler-tester/xmldocdiff.cs b/mcs/tools/compiler-tester/xmldocdiff.cs index bd9ade36038..ddcb6a70c08 100644 --- a/mcs/tools/compiler-tester/xmldocdiff.cs +++ b/mcs/tools/compiler-tester/xmldocdiff.cs @@ -24,9 +24,9 @@ // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// +// -#if !NET_2_1 +#if !MOBILE using System; using System.Collections; @@ -137,4 +137,4 @@ public class XmlComparer } } -#endif +#endif