diff options
Diffstat (limited to 'mcs/class/corlib')
87 files changed, 151 insertions, 151 deletions
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 /// <summary> /// Get a fully qualified path to the system directory /// </summary> @@ -480,7 +480,7 @@ namespace System { /// </summary> 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 { /// <summary> /// Return a set of all environment variables and their values /// </summary> -#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> (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> (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 /// <summary> /// Determine whether windows of not (taken Stephane Delcroix's code) /// </summary> @@ -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 () |