Kill the MOONLIGHT define in corlib.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 15 Jan 2013 00:34:30 +0000 (19:34 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 11 Feb 2013 21:03:28 +0000 (16:03 -0500)
140 files changed:
mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs
mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
mcs/class/corlib/Mono.Security.Cryptography/CryptoTools.cs
mcs/class/corlib/Mono.Security.Cryptography/KeyPairPersistence.cs
mcs/class/corlib/Mono.Security.Cryptography/PKCS1.cs
mcs/class/corlib/Mono.Security.Cryptography/PKCS8.cs
mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs
mcs/class/corlib/Mono.Security.X509/X509Certificate.cs
mcs/class/corlib/Mono.Security.X509/X509CertificateCollection.cs
mcs/class/corlib/Mono.Security.X509/X509Extension.cs
mcs/class/corlib/Mono.Security.X509/X509Extensions.cs
mcs/class/corlib/Mono.Security/ASN1.cs
mcs/class/corlib/Mono.Security/StrongName.cs
mcs/class/corlib/System.Collections/IStructuralComparable.cs
mcs/class/corlib/System.Collections/IStructuralEquatable.cs
mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
mcs/class/corlib/System.Diagnostics/StackFrame.cs
mcs/class/corlib/System.Globalization/Calendar.cs
mcs/class/corlib/System.Globalization/CompareInfo.cs
mcs/class/corlib/System.Globalization/CultureInfo.cs
mcs/class/corlib/System.Globalization/CultureNotFoundException.cs
mcs/class/corlib/System.Globalization/TimeSpanStyles.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileEnumerator.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageScope.cs
mcs/class/corlib/System.IO/Directory.cs
mcs/class/corlib/System.IO/DirectoryInfo.cs
mcs/class/corlib/System.IO/File.cs
mcs/class/corlib/System.IO/FileInfo.cs
mcs/class/corlib/System.IO/FileStream.cs
mcs/class/corlib/System.IO/MonoIO.cs
mcs/class/corlib/System.IO/Path.cs
mcs/class/corlib/System.IO/Stream.cs
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Reflection/EventInfo.cs
mcs/class/corlib/System.Reflection/MethodInfo.cs
mcs/class/corlib/System.Reflection/Module.cs
mcs/class/corlib/System.Reflection/MonoAssembly.cs
mcs/class/corlib/System.Reflection/MonoModule.cs
mcs/class/corlib/System.Reflection/ParameterInfo.cs
mcs/class/corlib/System.Resources/ResourceManager.cs
mcs/class/corlib/System.Resources/ResourceSet.cs
mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs
mcs/class/corlib/System.Runtime.CompilerServices/ContractHelper.cs
mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs
mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
mcs/class/corlib/System.Runtime.InteropServices/MarshalAsAttribute.cs
mcs/class/corlib/System.Runtime.Remoting.Activation/ActivationServices.cs
mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
mcs/class/corlib/System.Runtime.Remoting.Messaging/ConstructionCall.cs
mcs/class/corlib/System.Runtime.Remoting.Proxies/ProxyAttribute.cs
mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryCommon.cs
mcs/class/corlib/System.Runtime.Serialization/ObjectIDGenerator.cs
mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs
mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs
mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs
mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs
mcs/class/corlib/System.Security.Cryptography/CryptoConfig_2_1.cs
mcs/class/corlib/System.Security.Cryptography/DSACryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/HMACMD5.cs
mcs/class/corlib/System.Security.Cryptography/HMACRIPEMD160.cs
mcs/class/corlib/System.Security.Cryptography/HMACSHA384.cs
mcs/class/corlib/System.Security.Cryptography/HMACSHA512.cs
mcs/class/corlib/System.Security.Cryptography/MACTripleDES.cs
mcs/class/corlib/System.Security.Cryptography/RIPEMD160.cs
mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs
mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
mcs/class/corlib/System.Security.Cryptography/Rijndael.cs
mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs
mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs
mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/SHA384.cs
mcs/class/corlib/System.Security.Cryptography/SHA384Managed.cs
mcs/class/corlib/System.Security.Cryptography/SHA512.cs
mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs
mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs
mcs/class/corlib/System.Security.Permissions/PublisherIdentityPermissionAttribute.cs
mcs/class/corlib/System.Security.Permissions/SecurityAction.cs
mcs/class/corlib/System.Security.Policy/Evidence.cs
mcs/class/corlib/System.Security.Policy/Hash.cs
mcs/class/corlib/System.Security.Policy/HashMembershipCondition.cs
mcs/class/corlib/System.Security.Policy/PolicyLevel.cs
mcs/class/corlib/System.Security.Policy/Zone.cs
mcs/class/corlib/System.Security.Policy/ZoneMembershipCondition.cs
mcs/class/corlib/System.Security/IPermission.cs
mcs/class/corlib/System.Security/SecurityFrame.cs
mcs/class/corlib/System.Security/SecurityManager.cs
mcs/class/corlib/System.Security/SecuritySafeCriticalAttribute.cs
mcs/class/corlib/System.Security/SecurityTransparentAttribute.cs
mcs/class/corlib/System.Text/Encoding.cs
mcs/class/corlib/System.Text/StringBuilder.cs
mcs/class/corlib/System.Threading/ExecutionContext.cs
mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs
mcs/class/corlib/System.Threading/Monitor.cs
mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
mcs/class/corlib/System.Threading/Thread.cs
mcs/class/corlib/System.Threading/ThreadPool.cs
mcs/class/corlib/System.Threading/Timer.cs
mcs/class/corlib/System.Threading/WaitHandle.cs
mcs/class/corlib/System/Action.cs
mcs/class/corlib/System/Activator.cs
mcs/class/corlib/System/AppDomain.cs
mcs/class/corlib/System/AppDomainSetup.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/Console.cs
mcs/class/corlib/System/ContextStaticAttribute.cs
mcs/class/corlib/System/Enum.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/Exception.cs
mcs/class/corlib/System/ExecutionEngineException.cs
mcs/class/corlib/System/Funcs.cs
mcs/class/corlib/System/GC.cs
mcs/class/corlib/System/Guid.cs
mcs/class/corlib/System/InvalidTimeZoneException.cs
mcs/class/corlib/System/Lazy.cs
mcs/class/corlib/System/STAThreadAttribute.cs
mcs/class/corlib/System/String.cs
mcs/class/corlib/System/TimeSpan.cs
mcs/class/corlib/System/TimeZoneNotFoundException.cs
mcs/class/corlib/System/Tuple.cs
mcs/class/corlib/System/Tuples.cs
mcs/class/corlib/System/TypeAccessException.cs
mcs/class/corlib/System/Version.cs
mcs/class/corlib/System/_AppDomain.cs
mcs/class/corlib/Test/System.Text/StringBuilderTest.cs

index c766628f6fcdffe440286567bf94b9e4254f072c..bee47e7b045ec6e23f4de258b4fde3be29c16ba7 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System;
 using System.IO;
 using System.Security.Cryptography;
@@ -281,6 +279,3 @@ namespace Mono.Security.Authenticode {
                }
        }
 }
-
-#endif
-
index 647fd419659486bdc75dda78b5744ecb80505f86..a92affc4e549f169a97632f952654b38da513670 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System;
 using System.IO;
 using System.Runtime.InteropServices;
@@ -456,6 +454,3 @@ namespace Mono.Security.Authenticode {
                }
        }
 }
-
-#endif
-
index e88c21cf74a75adbb6639b988650a3987a904091..a528714f861452c89760e988c2dac4f0387ef676 100644 (file)
@@ -48,13 +48,8 @@ namespace Mono.Security.Cryptography {
 
                static RandomNumberGenerator Rng {
                        get {
-#if MOONLIGHT
-                               if (rng == null)
-                                       rng = new RNGCryptoServiceProvider ();
-#else
                                if (rng == null)
                                        rng = RandomNumberGenerator.Create ();
-#endif
                                return rng;
                        }
                }
index c118cc3785c7633399b4d0fff3da33ba6cdbf9a4..0615770aaf51e6664b630f1ca66f0d88251af0b2 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System;
 using System.Globalization;
 using System.IO;
@@ -454,6 +452,3 @@ namespace Mono.Security.Cryptography {
                }
        }
 }
-
-#endif
-
index ca979eec32c39318131cd5a3954727c113fb9208..3b3252db94968196c67ca518cc84b9d2acab953b 100644 (file)
@@ -68,10 +68,8 @@ namespace Mono.Security.Cryptography {
        
                private static byte[] emptySHA1   = { 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09 };
                private static byte[] emptySHA256 = { 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55 };
-#if !MOONLIGHT
                private static byte[] emptySHA384 = { 0x38, 0xb0, 0x60, 0xa7, 0x51, 0xac, 0x96, 0x38, 0x4c, 0xd9, 0x32, 0x7e, 0xb1, 0xb1, 0xe3, 0x6a, 0x21, 0xfd, 0xb7, 0x11, 0x14, 0xbe, 0x07, 0x43, 0x4c, 0x0c, 0xc7, 0xbf, 0x63, 0xf6, 0xe1, 0xda, 0x27, 0x4e, 0xde, 0xbf, 0xe7, 0x6f, 0x65, 0xfb, 0xd5, 0x1a, 0xd2, 0xf1, 0x48, 0x98, 0xb9, 0x5b };
                private static byte[] emptySHA512 = { 0xcf, 0x83, 0xe1, 0x35, 0x7e, 0xef, 0xb8, 0xbd, 0xf1, 0x54, 0x28, 0x50, 0xd6, 0x6d, 0x80, 0x07, 0xd6, 0x20, 0xe4, 0x05, 0x0b, 0x57, 0x15, 0xdc, 0x83, 0xf4, 0xa9, 0x21, 0xd3, 0x6c, 0xe9, 0xce, 0x47, 0xd0, 0xd1, 0x3c, 0x5d, 0x85, 0xf2, 0xb0, 0xff, 0x83, 0x18, 0xd2, 0x87, 0x7e, 0xec, 0x2f, 0x63, 0xb9, 0x31, 0xbd, 0x47, 0x41, 0x7a, 0x81, 0xa5, 0x38, 0x32, 0x7a, 0xf9, 0x27, 0xda, 0x3e };
-#endif
        
                private static byte[] GetEmptyHash (HashAlgorithm hash) 
                {
@@ -79,12 +77,10 @@ namespace Mono.Security.Cryptography {
                                return emptySHA1;
                        else if (hash is SHA256)
                                return emptySHA256;
-#if !MOONLIGHT
                        else if (hash is SHA384)
                                return emptySHA384;
                        else if (hash is SHA512)
                                return emptySHA512;
-#endif
                        else
                                return hash.ComputeHash ((byte[])null);
                }
index 84b830f245835b9db8069e4f126f7261a636fa1f..d26b85c9c75294516d9f9d2e32f02bb7037a8eb9 100644 (file)
@@ -272,10 +272,6 @@ namespace Mono.Security.Cryptography {
                                param.InverseQ = Normalize (privateKey [8].Value, keysize2);
                                param.P = Normalize (privateKey [4].Value, keysize2);
                                param.Q = Normalize (privateKey [5].Value, keysize2);
-#if MOONLIGHT
-                               RSA rsa = RSA.Create ();
-                               rsa.ImportParameters (param);
-#else
                                RSA rsa = null;
                                try {
                                        rsa = RSA.Create ();
@@ -290,7 +286,6 @@ namespace Mono.Security.Cryptography {
                                        rsa = new RSACryptoServiceProvider (csp);
                                        rsa.ImportParameters (param);
                                }
-#endif
                                return rsa;
                        }
 
index d82701c5c523a24045d036c2938de236f7e8481e..221f0fb695da35c55adeb344ec1db015086e5867 100644 (file)
@@ -51,10 +51,8 @@ namespace Mono.Security.Cryptography {
                private byte[] workBuff;
                private byte[] workout;
                protected PaddingMode padmode;
-#if !MOONLIGHT
                // Silverlight 2.0 does not support any feedback mode
                protected int FeedBackByte;
-#endif
                private bool m_disposed = false;
                protected bool lastBlock;
 
@@ -80,9 +78,7 @@ namespace Mono.Security.Cryptography {
                        temp = new byte [BlockSizeByte];
                        Buffer.BlockCopy (rgbIV, 0, temp, 0, System.Math.Min (BlockSizeByte, rgbIV.Length));
                        temp2 = new byte [BlockSizeByte];
-#if !MOONLIGHT
                        FeedBackByte = (algo.FeedbackSize >> 3);
-#endif
                        // transform buffers
                        workBuff = new byte [BlockSizeByte];
                        workout =  new byte [BlockSizeByte];
@@ -135,10 +131,6 @@ namespace Mono.Security.Cryptography {
                // i.e. Any padding must be done before calling this method
                protected virtual void Transform (byte[] input, byte[] output) 
                {
-#if MOONLIGHT
-                       // Silverlight 2.0 only supports CBC
-                       CBC (input, output);
-#else
                        switch (algo.Mode) {
                        case CipherMode.ECB:
                                ECB (input, output);
@@ -158,7 +150,6 @@ namespace Mono.Security.Cryptography {
                        default:
                                throw new NotImplementedException ("Unkown CipherMode" + algo.Mode.ToString ());
                        }
-#endif
                }
 
                // Electronic Code Book (ECB)
@@ -182,7 +173,6 @@ namespace Mono.Security.Cryptography {
                        }
                }
 
-#if !MOONLIGHT
                // Cipher-FeedBack (CFB)
                // this is how *CryptoServiceProvider implements CFB
                // only AesCryptoServiceProvider support CFB > 8
@@ -224,7 +214,6 @@ namespace Mono.Security.Cryptography {
                {
                        throw new CryptographicException ("CTS isn't supported by the framework");
                }
-#endif
 
                private void CheckInput (byte[] inputBuffer, int inputOffset, int inputCount)
                {
@@ -253,14 +242,9 @@ namespace Mono.Security.Cryptography {
 
                        // ordered to avoid possible integer overflow
                        int len = outputBuffer.Length - inputCount - outputOffset;
-#if MOONLIGHT
-                       // only PKCS7 is supported Silverlight 2.0
-                       if (KeepLastBlock) {
-#else
                        if (!encrypt && (0 > len) && ((padmode == PaddingMode.None) || (padmode == PaddingMode.Zeros))) {
                                throw new CryptographicException ("outputBuffer", Locale.GetText ("Overflow"));
                        } else if (KeepLastBlock) {
-#endif
                                if (0 > len + BlockSizeByte) {
                                        throw new CryptographicException ("outputBuffer", Locale.GetText ("Overflow"));
                                }
@@ -278,12 +262,7 @@ namespace Mono.Security.Cryptography {
 
                private bool KeepLastBlock {
                        get {
-#if MOONLIGHT
-                               // only PKCS7 is supported Silverlight 2.0
-                               return !encrypt;
-#else
                                return ((!encrypt) && (padmode != PaddingMode.None) && (padmode != PaddingMode.Zeros));
-#endif
                        }
                }
 
@@ -333,7 +312,6 @@ namespace Mono.Security.Cryptography {
                        return total;
                }
 
-#if !MOONLIGHT
                RandomNumberGenerator _rng;
 
                private void Random (byte[] buffer, int start, int length)
@@ -355,7 +333,6 @@ namespace Mono.Security.Cryptography {
                                msg += String.Format (Locale.GetText (" Error found at position {0}."), position);
                        throw new CryptographicException (msg);
                }
-#endif
 
                protected virtual byte[] FinalEncrypt (byte[] inputBuffer, int inputOffset, int inputCount) 
                {
@@ -364,10 +341,6 @@ namespace Mono.Security.Cryptography {
                        int rem = inputCount - full;
                        int total = full;
 
-#if MOONLIGHT
-                       // only PKCS7 is supported Silverlight 2.0
-                       total += BlockSizeByte;
-#else
                        switch (padmode) {
                        case PaddingMode.ANSIX923:
                        case PaddingMode.ISO10126:
@@ -391,7 +364,6 @@ namespace Mono.Security.Cryptography {
                                }
                                break;
                        }
-#endif // NET_2_1
 
                        byte[] res = new byte [total];
                        int outputOffset = 0;
@@ -406,13 +378,6 @@ namespace Mono.Security.Cryptography {
 
                        // now we only have a single last block to encrypt
                        byte padding = (byte) (BlockSizeByte - rem);
-#if MOONLIGHT
-                       // only PKCS7 is supported Silverlight 2.0
-                       for (int i = res.Length; --i >= (res.Length - padding);) 
-                               res [i] = padding;
-                       Buffer.BlockCopy (inputBuffer, inputOffset, res, full, rem);
-                       InternalTransformBlock (res, full, BlockSizeByte, res, full);
-#else
                        switch (padmode) {
                        case PaddingMode.ANSIX923:
                                // XX 00 00 00 00 00 00 07 (zero + padding length)
@@ -441,7 +406,6 @@ namespace Mono.Security.Cryptography {
                                InternalTransformBlock (inputBuffer, inputOffset, BlockSizeByte, res, outputOffset);
                                break;
                        }
-#endif // NET_2_1
                        return res;
                }
 
@@ -471,16 +435,6 @@ namespace Mono.Security.Cryptography {
 
                        // total may be 0 (e.g. PaddingMode.None)
                        byte padding = ((total > 0) ? res [total - 1] : (byte) 0);
-#if MOONLIGHT
-                       // only PKCS7 is supported Silverlight 2.0
-                       if ((padding == 0) || (padding > BlockSizeByte))
-                               throw new CryptographicException (Locale.GetText ("Bad padding length."));
-                       for (int i = padding - 1; i > 0; i--) {
-                               if (res [total - 1 - i] != padding)
-                                       throw new CryptographicException (Locale.GetText ("Bad padding at position {0}.", i));
-                       }
-                       total -= padding;
-#else
                        switch (padmode) {
                        case PaddingMode.ANSIX923:
                                if ((padding == 0) || (padding > BlockSizeByte))
@@ -509,7 +463,6 @@ namespace Mono.Security.Cryptography {
                        case PaddingMode.Zeros: // nothing to do - user must unpad himself
                                break;
                        }
-#endif // NET_2_1
 
                        // return output without padding
                        if (total > 0) {
index af0c0a1f81994a6338526ef52a6bc25516204533..5131e99d5253bb40d15a273b85719cb33e6195dd 100644 (file)
@@ -44,7 +44,7 @@ namespace Mono.Security.X509 {
        // b.   ITU ASN.1 standards (free download)
        //      http://www.itu.int/ITU-T/studygroups/com17/languages/
 
-#if INSIDE_CORLIB && !MOONLIGHT
+#if INSIDE_CORLIB
        internal class X509Certificate : ISerializable {
 #else
        public class X509Certificate : ISerializable {
@@ -265,12 +265,8 @@ namespace Mono.Security.X509 {
                                        // BUG: MS BCL 1.0 can't import a key which 
                                        // isn't the same size as the one present in
                                        // the container.
-#if MOONLIGHT
-                                       _dsa = new DSAManaged (dsaParams.Y.Length << 3);
-#else
                                        _dsa = (DSA) new DSACryptoServiceProvider (dsaParams.Y.Length << 3);
                                        _dsa.ImportParameters (dsaParams);
-#endif
                                }
                                return _dsa; 
                        }
@@ -365,12 +361,8 @@ namespace Mono.Security.X509 {
                                        // isn't the same size as the one present in
                                        // the container.
                                        int keySize = (rsaParams.Modulus.Length << 3);
-#if MOONLIGHT
-                                       _rsa = new RSAManaged (keySize);
-#else
                                        _rsa = (RSA) new RSACryptoServiceProvider (keySize);
                                        _rsa.ImportParameters (rsaParams);
-#endif
                                }
                                return _rsa; 
                        }
@@ -542,14 +534,8 @@ namespace Mono.Security.X509 {
 
                public bool CheckSignature (byte[] hash, string hashAlgorithm, byte[] signature) 
                {
-#if MOONLIGHT
-                       string hashName = GetHashNameFromOID (hashAlgorithm);
-                       HashAlgorithm algo = HashAlgorithm.Create (hashName);
-                       return PKCS1.Verify_v15 (RSA, algo, hash, signature);
-#else
                        RSACryptoServiceProvider r = (RSACryptoServiceProvider) RSA;
                        return r.VerifyHash (hash, hashAlgorithm, signature);
-#endif
                }
 
                public bool IsSelfSigned {
index 0527a0771ae7ac0db13f6494d2c197e12ee38fa0..1b7b8405dccd5f552450053e0ec44c9936ac2604 100644 (file)
@@ -36,7 +36,7 @@ using System.Collections;
 namespace Mono.Security.X509 {
 
        [Serializable]
-#if INSIDE_CORLIB && !MOONLIGHT
+#if INSIDE_CORLIB
        internal
 #else
        public 
index ebccb11b5d329932b1032f1951935acd55cd62a6..637e74b48cd20d7bb065966fceb941f6f7c1dac5 100644 (file)
@@ -41,7 +41,7 @@ namespace Mono.Security.X509 {
         *      extnValue   OCTET STRING  
         * }
         */
-#if INSIDE_CORLIB && !MOONLIGHT
+#if INSIDE_CORLIB
        internal
 #else
        public 
index d02d461486a7d13193b8208f027e233fa63887b8..da2de3c0d09ca65e1af8d1d1b9fd2d5609395aeb 100644 (file)
@@ -42,7 +42,7 @@ namespace Mono.Security.X509 {
         * 
         * Note: 1..MAX -> There shouldn't be 0 Extensions in the ASN1 structure
         */
-#if INSIDE_CORLIB && !MOONLIGHT
+#if INSIDE_CORLIB
        internal
 #else
        public 
index 31352985355254187175ecdc414e35db55fde0c2..2d656706764c6ab28ae35e2a0601338eb4ad5590 100644 (file)
@@ -39,8 +39,7 @@ namespace Mono.Security {
        // References:
        // a.   ITU ASN.1 standards (free download)
        //      http://www.itu.int/ITU-T/studygroups/com17/languages/
-
-#if INSIDE_CORLIB && !MOONLIGHT
+#if INSIDE_CORLIB
        internal
 #else
        public
index 6fb7d88eedfd2fcdc0fc1db229a33510500e91ea..4c6aaeeb3f9ccce8d558a0c0381ee5e1552ae210 100644 (file)
@@ -160,7 +160,7 @@ namespace Mono.Security {
                        get {
                                if (rsa == null)
                                        return false;
-#if INSIDE_CORLIB && !MOONLIGHT
+#if INSIDE_CORLIB
                                // the easy way
                                if (RSA is RSACryptoServiceProvider) {
                                        // available as internal for corlib
index d78267b668262a694f15bcdf3d6300001d532289..363d443c0c1a47317fe8346932a1d2e1dc3b6c36 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if MOONLIGHT || NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 
index a824da3104ac92f4379ee50c65a8f27f27d6624c..cfed4861dc7726c0f586b39e3460db38885d781c 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if MOONLIGHT || NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 
index 76134fe56d6f6d003ce1e3de09442290285d0255..0e8ef2ae3cfc3deb01027e4cc78a1407b892ff39 100644 (file)
@@ -40,23 +40,6 @@ namespace System.Diagnostics.Contracts.Internal
 #endif
        public static class ContractHelper
        {
-#if MOONLIGHT
-               const string SystemWindowsBrowser = ", System.Windows.Browser, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e";
-               const string HtmlPage = "System.Windows.Browser.HtmlPage" + SystemWindowsBrowser;
-               const string HtmlWindow = "System.Windows.Browser.HtmlWindow" + SystemWindowsBrowser;
-               static MethodInfo alert;
-               static object window;
-
-               static ContractHelper ()
-               {
-                       Type htmlpage = Type.GetType (HtmlPage);
-                       MethodInfo get_window = htmlpage.GetMethod ("get_Window", BindingFlags.Static | BindingFlags.Public);
-                       window = get_window.Invoke (null, null);
-                       Type htmlwindow = Type.GetType (HtmlWindow);
-                       alert = htmlwindow.GetMethod ("Alert", BindingFlags.Instance | BindingFlags.Public);
-               }
-#endif
-
                [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
                [DebuggerNonUserCode]
                public static string RaiseContractFailedEvent (ContractFailureKind failureKind, string userMessage, string conditionText, Exception innerException)
@@ -141,12 +124,6 @@ namespace System.Diagnostics.Contracts.Internal
                        if (displayMessage != null) {
                                msg.Append (displayMessage);
                        }
-#if MOONLIGHT
-                       // Silverlight shows a dialog that let you Abort (kill process/browser), Retry or Ignore
-                       // Moonlight will simply warn and ignore (at least until FailFast is implemented)
-                       // using reflection into System.Windows.Browser to popup an browser alert
-                       alert.Invoke (window, new object [] { msg.ToString () });
-#else
                        if (Environment.UserInteractive) {
                                // FIXME: This should trigger an assertion.
                                // But code will never get here at the moment, as Environment.UserInteractive currently
@@ -156,7 +133,6 @@ namespace System.Diagnostics.Contracts.Internal
                                // Note that FailFast() currently throws a NotImplementedException()
                                Environment.FailFast(msg.ToString()/*, new ExecutionEngineException()*/);
                        }
-#endif
                }
 
        }
index 76186d42d931fa29d51ae40fda7ea865ccc59e92..37a6c559fb32abf79851ef23a959877676ecaf6b 100644 (file)
@@ -141,26 +141,12 @@ namespace System.Diagnostics {
                        string filename = "<filename unknown>";
                        if (fileName == null)
                                return filename;
-#if !MOONLIGHT
                        try {
                                filename = GetFileName ();
                        }
                        catch (SecurityException) {
                                // CAS check failure
                        }
-#else
-                       // Silverlight always return <filename unknown> but that's not very useful for debugging
-                       // OTOH we do not want to share any details about the original file system (even if they
-                       // are likely available in the debugging symbols files) from the browser's plugin (but
-                       // compiling stuff from smcs is fine since it's outside the sandbox)
-                       try {
-                               if (SecurityManager.SecurityEnabled)
-                                       filename = Path.GetFileName (fileName);
-                       }
-                       catch (ArgumentException) {
-                               // e.g. invalid chars in filename
-                       }
-#endif
                        return filename;
                }
                 
index 9cbb0225b057b0026fc6764a774dcea910ab31d6..ac9300d3701fc99a04e54b59e10312287457ea83 100644 (file)
@@ -128,14 +128,12 @@ public abstract class Calendar : ICloneable
        [NonSerialized]
        bool m_isReadOnly;
 
-#if !MOONLIGHT
        [System.Runtime.InteropServices.ComVisible(false)]
        public virtual CalendarAlgorithmType AlgorithmType {
                get {
                        return CalendarAlgorithmType.Unknown;
                }
        }
-#endif
 
        [System.Runtime.InteropServices.ComVisible(false)]
        public virtual DateTime MaxSupportedDateTime {
index cb894d969f1d37d2f389a79fe4d39dde10254254..54f4eed37f70146fa1f279128a3664df51da2eb1 100644 (file)
@@ -42,7 +42,7 @@ namespace System.Globalization
 {
        [Serializable]
        [StructLayout (LayoutKind.Sequential)]
-#if !MOONLIGHT
+
        [ComVisible (true)]
        public class CompareInfo : IDeserializationCallback {
 
@@ -100,12 +100,6 @@ namespace System.Globalization
                                                   CompareOptions options,
                                                   bool first);
 
-#else
-       public class CompareInfo {
-               internal static bool UseManagedCollation {
-                       get { return true; }
-               }
-#endif
                const CompareOptions ValidCompareOptions_NoStringSort =
                        CompareOptions.None | CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace |
                        CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth |
@@ -152,22 +146,17 @@ namespace System.Globalization
                                }
                        } else {
 /*
-#if !MOONLIGHT
                                this.icu_name = ci.IcuName;
                                this.construct_compareinfo (icu_name);
-#endif
 */
                        }
                }
 /*
                ~CompareInfo ()
                {
-#if !MOONLIGHT
                        free_internal_collator ();
-#endif
                }
 */
-#if !MOONLIGHT
                private int internal_compare_managed (string str1, int offset1,
                                                int length1, string str2,
                                                int offset2, int length2,
@@ -188,16 +177,7 @@ namespace System.Globalization
                                internal_compare (str1, offset1, length1,
                                str2, offset2, length2, options);
                }
-#else
-               private int internal_compare_switch (string str1, int offset1,
-                                               int length1, string str2,
-                                               int offset2, int length2,
-                                               CompareOptions options)
-               {
-                       return collator.Compare (str1, offset1, length1,
-                               str2, offset2, length2, options);
-               }
-#endif
+
                public virtual int Compare (string string1, string string2)
                {
                        return Compare (string1, string2, CompareOptions.None);
@@ -413,7 +393,6 @@ namespace System.Globalization
                        case CompareOptions.OrdinalIgnoreCase:
                                throw new ArgumentException ("Now allowed CompareOptions.", "options");
                        }
-#if !MOONLIGHT
                        if (UseManagedCollation)
                                return collator.GetSortKey (source, options);
                        SortKey key=new SortKey (culture, source, options);
@@ -425,9 +404,6 @@ namespace System.Globalization
                        assign_sortkey (key, source, options);
                        
                        return(key);
-#else
-                       return collator.GetSortKey (source, options);
-#endif
                }
 
                public virtual int IndexOf (string source, char value)
@@ -502,7 +478,6 @@ namespace System.Globalization
                                        CompareOptions.None));
                }
 
-#if !MOONLIGHT
                private int internal_index_managed (string s, int sindex,
                        int count, char c, CompareOptions opt,
                        bool first)
@@ -524,16 +499,6 @@ namespace System.Globalization
                                internal_index_managed (s, sindex, count, c, opt, first) :
                                internal_index (s, sindex, count, c, opt, first);
                }
-#else
-               private int internal_index_switch (string s, int sindex,
-                       int count, char c, CompareOptions opt,
-                       bool first)
-               {
-                       return first ?
-                               collator.IndexOf (s, c, sindex, count, opt) :
-                               collator.LastIndexOf (s, c, sindex, count, opt);
-               }
-#endif
 
                public virtual int IndexOf (string source, char value,
                                            int startIndex, int count,
@@ -571,7 +536,6 @@ namespace System.Globalization
                        }
                }
 
-#if !MOONLIGHT
                private int internal_index_managed (string s1, int sindex,
                        int count, string s2, CompareOptions opt,
                        bool first)
@@ -593,16 +557,6 @@ namespace System.Globalization
                                internal_index_managed (s1, sindex, count, s2, opt, first) :
                                internal_index (s1, sindex, count, s2, opt, first);
                }
-#else
-               private int internal_index_switch (string s1, int sindex,
-                       int count, string s2, CompareOptions opt,
-                       bool first)
-               {
-                       return first ?
-                               collator.IndexOf (s1, s2, sindex, count, opt) :
-                               collator.LastIndexOf (s1, s2, sindex, count, opt);
-               }
-#endif
 
                public virtual int IndexOf (string source, string value,
                                            int startIndex, int count,
index 12ab18df50b0de6fa1c3ec4ab74a855acf4b5ade..5ab1233cee0b6ab860b2eca9af7549231d016c64 100644 (file)
@@ -237,12 +237,6 @@ namespace System.Globalization
 
                public virtual string Name {
                        get {
-#if MOONLIGHT
-                               if (m_name == "zh-CHS")
-                                       return "zh-Hans";
-                               if (m_name == "zh-CHT")
-                                       return "zh-Hant";
-#endif
                                return(m_name);
                        }
                }
@@ -372,7 +366,6 @@ namespace System.Globalization
                        return false;
                }
 
-#if !MOONLIGHT
                public static CultureInfo[] GetCultures(CultureTypes types)
                {
                        bool neutral=((types & CultureTypes.NeutralCultures)!=0);
@@ -389,7 +382,6 @@ namespace System.Globalization
 
                        return infos;
                }
-#endif
 
                public override int GetHashCode ()
                {
@@ -452,7 +444,7 @@ namespace System.Globalization
 
                internal void CheckNeutral ()
                {
-#if !MOONLIGHT && !NET_4_0
+#if !NET_4_0
                        if (IsNeutralCulture) {
                                throw new NotSupportedException ("Culture \"" + m_name + "\" is " +
                                                "a neutral culture. It can not be used in formatting " +
index bd1ed1448b4fe56ee4957a9a281a773627d84b40..0202203327c27e616f87fdd9c8c451ea26b21d7b 100644 (file)
@@ -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_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Runtime.InteropServices;
index 18b3c927106671d4c7aa3c564047ccca215aab77..07062f3b74011c42eb53f54cc5dca56b3521b9de 100644 (file)
@@ -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_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 
index deb570d6b5d79b1c221390b3923c4eb4190d0135..f1604f7ce2ddcd5c1c79e207ade44a127b5955e5 100644 (file)
@@ -28,7 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
 using System.Globalization;
 using System.Reflection;
 using System.Runtime.InteropServices;
@@ -192,5 +191,3 @@ namespace System.IO.IsolatedStorage {
 #endif
        }
 }
-/* MOONLIGHT */
-#endif 
index 5d5e233222577a10c68c4c151de16bc34cf38693..d2ec334b6cc0da3f07320959238e5a3b6c799ede 100644 (file)
@@ -27,7 +27,6 @@
 // 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 !MOONLIGHT
 using System.Collections;
 using System.Reflection;
 using System.Runtime.InteropServices;
@@ -1098,4 +1097,3 @@ namespace System.IO.IsolatedStorage {
 #endif
        }
 }
-#endif
index 08457bff978ea0448ab4dfb942520ab3731bc131..5d4c62f5583b46144b53c3975b328348a751407e 100644 (file)
@@ -28,8 +28,6 @@
 
 using System.Collections;
 
-#if !MOONLIGHT
-
 namespace System.IO.IsolatedStorage {
 
        internal class IsolatedStorageFileEnumerator : IEnumerator {
@@ -69,4 +67,3 @@ namespace System.IO.IsolatedStorage {
                }
        }
 }
-#endif
index 0d35d6c2f95a3a23c5ac6d9df5581a972b2060ae..5df57df1105f7079fd56ae54264740aef68fa887 100644 (file)
@@ -27,7 +27,6 @@
 // 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 !MOONLIGHT
 using System.Diagnostics;
 using System.Globalization;
 using System.Reflection;
@@ -257,4 +256,3 @@ namespace System.IO.IsolatedStorage {
                }
        }
 }
-#endif
index bde8468ccc8f2ee09efbbe4ffc5bd5c8fea5579c..455a22997d6a27905a70df7ba09107c381bc0897 100644 (file)
@@ -41,10 +41,6 @@ namespace System.IO.IsolatedStorage {
 
                None = 0,
                User = 1,
-#if MOONLIGHT
-               // Available in Silverlight
-               Application = 32,
-#else
                Domain = 2,
                Assembly = 4,
 
@@ -53,6 +49,5 @@ namespace System.IO.IsolatedStorage {
 
                Machine = 16,
                Application = 32
-#endif
        }
 }
index 6921a255e259b0ef12b7ca6bab64b0403484e187..e0648f08ca433348607c549ee9f45f9a42bb7e6d 100644 (file)
@@ -44,10 +44,7 @@ using System.Security;
 using System.Security.Permissions;
 using System.Text;
 using System.Runtime.InteropServices;
-
-#if !MOONLIGHT
 using System.Security.AccessControl;
-#endif
 
 namespace System.IO
 {
@@ -83,13 +80,11 @@ namespace System.IO
                        return CreateDirectoriesInternal (path);
                }
 
-#if !MOONLIGHT
                [MonoLimitation ("DirectorySecurity not implemented")]
                public static DirectoryInfo CreateDirectory (string path, DirectorySecurity directorySecurity)
                {
                        return(CreateDirectory (path));
                }
-#endif
 
                static DirectoryInfo CreateDirectoriesInternal (string path)
                {
@@ -268,7 +263,6 @@ namespace System.IO
                        return GetFileSystemEntries (path, searchPattern, FileAttributes.Directory, FileAttributes.Directory);
                }
                
-#if !MOONLIGHT
                public static string [] GetDirectories (string path, string searchPattern, SearchOption searchOption)
                {
                        if (searchOption == SearchOption.TopDirectoryOnly)
@@ -284,7 +278,6 @@ namespace System.IO
                        foreach (string dir in GetDirectories (path))
                                GetDirectoriesRecurse (dir, searchPattern, all);
                }
-#endif
 
                public static string GetDirectoryRoot (string path)
                {
@@ -305,7 +298,6 @@ namespace System.IO
                        return GetFileSystemEntries (path, searchPattern, FileAttributes.Directory, 0);
                }
 
-#if !MOONLIGHT
                public static string[] GetFiles (string path, string searchPattern, SearchOption searchOption)
                {
                        if (searchOption == SearchOption.TopDirectoryOnly)
@@ -321,7 +313,6 @@ namespace System.IO
                        foreach (string dir in GetDirectories (path))
                                GetFilesRecurse (dir, searchPattern, all);
                }
-#endif
 
                public static string [] GetFileSystemEntries (string path)
                {
@@ -397,7 +388,6 @@ namespace System.IO
                                throw MonoIO.GetException (error);
                }
 
-#if !MOONLIGHT
                public static void SetAccessControl (string path, DirectorySecurity directorySecurity)
                {
                        if (null == directorySecurity)
@@ -405,7 +395,6 @@ namespace System.IO
                                
                        directorySecurity.PersistModifications (path);
                }
-#endif
 
                public static void SetCreationTime (string path, DateTime creationTime)
                {
@@ -511,7 +500,7 @@ namespace System.IO
                        return result;
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public static string[] GetFileSystemEntries (string path, string searchPattern, SearchOption searchOption)
                {
                        // Take the simple way home:
@@ -648,7 +637,6 @@ namespace System.IO
                
 #endif
 
-#if !MOONLIGHT
                public static DirectorySecurity GetAccessControl (string path, AccessControlSections includeSections)
                {
                        return new DirectorySecurity (path, includeSections);
@@ -662,6 +650,5 @@ namespace System.IO
                                                 AccessControlSections.Group |
                                                 AccessControlSections.Access);
                }
-#endif
        }
 }
index 84dab22851af944b24823f8bba37b4230b3d0c09..acfffac7c5a9007ad656de7cf88b187044da909e 100644 (file)
@@ -37,9 +37,7 @@ using System.Runtime.InteropServices;
 using System.Runtime.Serialization;
 using System.Security;
 using System.Text;
-#if !MOONLIGHT
 using System.Security.AccessControl;
-#endif
 
 namespace System.IO {
        
@@ -50,11 +48,6 @@ namespace System.IO {
                private string current;
                private string parent;
        
-#if MOONLIGHT
-               internal DirectoryInfo ()
-               {
-               }
-#endif
                public DirectoryInfo (string path) : this (path, false)
                {
                }
@@ -272,7 +265,6 @@ namespace System.IO {
                        return OriginalPath;
                }
 
-#if !MOONLIGHT
                public DirectoryInfo[] GetDirectories (string searchPattern, SearchOption searchOption)
                {
                    //NULL-check of searchPattern is done in Directory.GetDirectories
@@ -361,9 +353,8 @@ namespace System.IO {
                {
                        Directory.SetAccessControl (FullPath, directorySecurity);
                }
-#endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
                public IEnumerable<DirectoryInfo> EnumerateDirectories ()
                {
index 6781c451194ee630c553778bc46cb74267e0df3c..73c6b027961540b9ed021bb411ce124c195cef20 100644 (file)
@@ -616,7 +616,7 @@ namespace System.IO
                        throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
                }
 
-#if MOONLIGHT || NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE
                public static IEnumerable<string> ReadLines (string path)
                {
                        return ReadLines (File.OpenText (path));
index 9ace59e1688a4e7e30e1855e65d7f87ab5948927..0911f8152c4827f7fdafb5f2dd993d302a651da0 100644 (file)
@@ -49,11 +49,6 @@ namespace System.IO {
        {
                private bool exists;
 
-#if MOONLIGHT
-               internal FileInfo ()
-               {
-               }
-#endif
                public FileInfo (string fileName)
                {
                        if (fileName == null)
index 6bfe5e2ae02ff61dd1d008cc92659f727e2bf65b..808a93df9b39fa972c8d8c77bf221fefc6c51a32 100644 (file)
@@ -104,13 +104,7 @@ namespace System.IO
                        this.access = access;
                        this.owner = ownsHandle;
                        this.async = isAsync;
-#if MOONLIGHT
-                       // default the browser to 'all' anonymous files and let other usage (like smcs) with 'normal'
-                       // (i.e. non-anonymous except for isolated storage) files and paths
-                       this.anonymous = SecurityManager.SecurityEnabled;
-#else
                        this.anonymous = false;
-#endif
                        if (canseek) {
                                buf_start = MonoIO.Seek (handle, 0, SeekOrigin.Current, out error);
                                if (error != MonoIOError.ERROR_SUCCESS) {
@@ -224,20 +218,10 @@ namespace System.IO
                        }
 
                        if (access < FileAccess.Read || access > FileAccess.ReadWrite) {
-#if MOONLIGHT
-                               if (anonymous)
-                                       throw new IsolatedStorageException ("Enum value for FileAccess was out of legal range.");
-                               else
-#endif
                                throw new ArgumentOutOfRangeException ("access", "Enum value was out of legal range.");
                        }
 
                        if (share < FileShare.None || share > (FileShare.ReadWrite | FileShare.Delete)) {
-#if MOONLIGHT
-                               if (anonymous)
-                                       throw new IsolatedStorageException ("Enum value for FileShare was out of legal range.");
-                               else
-#endif
                                throw new ArgumentOutOfRangeException ("share", "Enum value was out of legal range.");
                        }
 
@@ -279,12 +263,7 @@ namespace System.IO
                                        // don't leak the path information for isolated storage
                                        string msg = Locale.GetText ("Could not find a part of the path \"{0}\".");
                                        string fname = (anonymous) ? dname : Path.GetFullPath (path);
-#if MOONLIGHT
-                                       // don't use GetSecureFileName for the directory name
-                                       throw new IsolatedStorageException (String.Format (msg, fname));
-#else
                                        throw new DirectoryNotFoundException (String.Format (msg, fname));
-#endif
                                }
                        }
 
@@ -293,11 +272,7 @@ namespace System.IO
                                // don't leak the path information for isolated storage
                                string msg = Locale.GetText ("Could not find file \"{0}\".");
                                string fname = GetSecureFileName (path);
-#if MOONLIGHT
-                               throw new IsolatedStorageException (String.Format (msg, fname));
-#else
                                throw new FileNotFoundException (String.Format (msg, fname), fname);
-#endif
                        }
 
                        // IsolatedStorage needs to keep the Name property to the default "[Unknown]"
@@ -376,11 +351,7 @@ namespace System.IO
 
                public string Name {
                        get {
-#if MOONLIGHT
-                               return SecurityManager.CheckElevatedPermissions () ? name : "[Unknown]";
-#else
                                return name;
-#endif
                        }
                }
 
@@ -859,7 +830,7 @@ namespace System.IO
                        FlushBuffer ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public virtual void Flush (bool flushToDisk)
                {
                        FlushBuffer ();
index b62e1453665f5909d7a43a5fceb9aa27fd571b1a..24968f13de1a37472569f4a1c11cff96389438e7 100644 (file)
@@ -85,22 +85,14 @@ namespace System.IO
                        // FIXME: add more exception mappings here
                        case MonoIOError.ERROR_FILE_NOT_FOUND:
                                message = String.Format ("Could not find file \"{0}\"", path);
-#if MOONLIGHT
-                               return new IsolatedStorageException (message);
-#else
                                return new FileNotFoundException (message, path);
-#endif
 
                        case MonoIOError.ERROR_TOO_MANY_OPEN_FILES:
                                return new IOException ("Too many open files", unchecked((int)0x80070000) | (int)error);
                                
                        case MonoIOError.ERROR_PATH_NOT_FOUND:
                                message = String.Format ("Could not find a part of the path \"{0}\"", path);
-#if MOONLIGHT
-                               return new IsolatedStorageException (message);
-#else
                                return new DirectoryNotFoundException (message);
-#endif
 
                        case MonoIOError.ERROR_ACCESS_DENIED:
                                message = String.Format ("Access to the path \"{0}\" is denied.", path);
index 64d450a44d53346ebed961e21a9e402826b08563..22cd8f688fcfcd88a47eb2d2df8664bc4dac24ef 100644 (file)
@@ -741,7 +741,7 @@ namespace System.IO {
                        return String.Compare (subset, slast, path, slast, subset.Length - slast) == 0;
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public
 #else
                 internal
@@ -781,7 +781,7 @@ namespace System.IO {
                        return ret.ToString ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public
 #else
                 internal
@@ -800,7 +800,7 @@ namespace System.IO {
                        return Combine (new string [] { path1, path2, path3 });
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public
 #else
                 internal
@@ -840,11 +840,6 @@ namespace System.IO {
                                if (idx >= 0 && idx != 1)
                                        throw new ArgumentException (parameterName);
                        }
-#if MOONLIGHT
-                       // On Moonlight (SL4+) there are some limitations in "Elevated Trust"
-                       if (SecurityManager.HasElevatedPermissions) {
-                       }
-#endif
                }
        }
 }
index 803220306ed47e4dfc99212fb80497a51b9d2191..c886724454f9fa9bcc0d1796550cdefbcb495411 100644 (file)
@@ -240,7 +240,7 @@ namespace System.IO
                        }
                }
 
-#if MOONLIGHT || NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE
                public void CopyTo (Stream destination)
                {
                        CopyTo (destination, 16*1024);
index 0b0da05f27e41c5c1b030439487744810bb5a13f..1e8d7130dbfa2265b3d588e7a9bb88a7d5d35a82 100644 (file)
@@ -266,13 +266,6 @@ namespace System.Reflection.Emit
                        if ((access & COMPILER_ACCESS) != 0)
                                throw new NotImplementedException ("COMPILER_ACCESS is no longer supperted, use a newer mcs.");
 
-#if MOONLIGHT
-                       // only "Run" is supported by Silverlight
-                       // however SMCS requires more than this but runs outside the CoreCLR sandbox
-                       if (SecurityManager.SecurityEnabled && (access != AssemblyBuilderAccess.Run))
-                               throw new ArgumentException ("access");
-#endif
-
                        if (!Enum.IsDefined (typeof (AssemblyBuilderAccess), access))
                                throw new ArgumentException (string.Format (CultureInfo.InvariantCulture,
                                        "Argument value {0} is not valid.", (int) access),
@@ -1075,7 +1068,7 @@ namespace System.Reflection.Emit
                        throw new NotImplementedException ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override Type GetType (string name, bool throwOnError, bool ignoreCase)
                {
                        if (name == null)
index ef727b615de442426cc7cf20892b05968b9ae8f5..1beb945a8d2082f067cc8896042ddfc7df8da347 100644 (file)
@@ -673,7 +673,7 @@ namespace System.Reflection.Emit
                        throw new NotImplementedException ();
                }
 
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                public override ParameterInfo ReturnParameter {
                        get { return base.ReturnParameter; }
                }
index 76524c6ab1d2e9b8770ff73d598d744cd866592c..316baa63d56baef2cbd4354c0a2eb69a57564eed 100644 (file)
@@ -105,16 +105,12 @@ namespace System.Reflection.Emit {
                        }
 
                        if (emitSymbolInfo) {
-#if MOONLIGHT
-                               symbolWriter = new Mono.CompilerServices.SymbolWriter.SymbolWriterImpl (this);
-#else
                                Assembly asm = Assembly.LoadWithPartialName ("Mono.CompilerServices.SymbolWriter");
                                if (asm == null)
                                        throw new TypeLoadException ("The assembly for default symbol writer cannot be loaded");
 
                                Type t = asm.GetType ("Mono.CompilerServices.SymbolWriter.SymbolWriterImpl", true);
                                symbolWriter = (ISymbolWriter) Activator.CreateInstance (t, new object[] { this });
-#endif
                                string fileName = fqname;
                                if (assemblyb.AssemblyDir != null)
                                        fileName = Path.Combine (assemblyb.AssemblyDir, fileName);
@@ -826,7 +822,7 @@ namespace System.Reflection.Emit {
                        throw new NotImplementedException ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override Assembly Assembly {
                        get { return assemblyb; }
                }
index 9880aa7d3307173257570f7ee18a720512906b26..1fc3baf285ac4d891637fc58e280bb1ce80373c8 100644 (file)
@@ -51,8 +51,6 @@ namespace System.Reflection {
        [StructLayout (LayoutKind.Sequential)]
 #if MOBILE
        public partial class Assembly : ICustomAttributeProvider, _Assembly {
-#elif MOONLIGHT
-       public abstract class Assembly : ICustomAttributeProvider, _Assembly {
 #elif NET_4_0
        public abstract class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
 #else
@@ -77,7 +75,7 @@ namespace System.Reflection {
                private bool fromByteArray;
                private string assemblyName;
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                protected
 #else
                internal
@@ -152,7 +150,7 @@ namespace System.Reflection {
                        [MethodImplAttribute (MethodImplOptions.InternalCall)]
                        get;
                }
-#if !MOONLIGHT
+
                public virtual Evidence Evidence {
                        [SecurityPermission (SecurityAction.Demand, ControlEvidence = true)]
                        get { return UnprotectedGetEvidence (); }
@@ -178,7 +176,6 @@ namespace System.Reflection {
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal extern bool get_global_assembly_cache ();
 
-#endif
                internal bool FromByteArray {
                        set { fromByteArray = value; }
                }
@@ -302,12 +299,6 @@ namespace System.Reflection {
 
                                string location = Path.GetDirectoryName (Location);
                                string filename = Path.Combine (location, info.FileName);
-#if MOONLIGHT
-                               // we don't control the content of 'info.FileName' so we want to make sure we keep to ourselves
-                               filename = Path.GetFullPath (filename);
-                               if (!filename.StartsWith (location))
-                                       throw new SecurityException ("non-rooted access to manifest resource");
-#endif
                                return new FileStream (filename, FileMode.Open, FileAccess.Read);
                        }
 
@@ -459,15 +450,6 @@ namespace System.Reflection {
                        // Try the assembly directory
                        string location = Path.GetDirectoryName (Location);
                        string fullName = Path.Combine (location, Path.Combine (culture.Name, aname.Name + ".dll"));
-#if MOONLIGHT
-                       // it's unlikely that culture.Name or aname.Name could contain stuff like ".." but...
-                       fullName = Path.GetFullPath (fullName);
-                       if (!fullName.StartsWith (location)) {
-                               if (throwOnError)
-                                       throw new SecurityException ("non-rooted access to satellite assembly");
-                               return null;
-                       }
-#endif
                        if (!throwOnError && !File.Exists (fullName))
                                return null;
 
@@ -631,7 +613,7 @@ namespace System.Reflection {
 
                [MonoTODO ("Not implemented")]
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                virtual
 #endif
                Module LoadModule (string moduleName, byte [] rawModule, byte [] rawSymbolStore)
@@ -686,7 +668,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                virtual
 #endif
                Object CreateInstance (String typeName, Boolean ignoreCase,
@@ -776,7 +758,7 @@ namespace System.Reflection {
                [MonoTODO ("Currently it always returns zero")]
                [ComVisible (false)]
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                virtual
 #endif
                long HostContext {
@@ -908,7 +890,7 @@ namespace System.Reflection {
 
 #endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                static Exception CreateNIE ()
                {
                        return new NotImplementedException ("Derived classes must implement it");
index 17f6b85dddf5bbc3a07a2fb083e6d1b01e7e87a9..7eeba72553073b14952393e5817a0902c1e0c26a 100644 (file)
@@ -43,7 +43,7 @@ namespace System.Reflection {
                public abstract EventAttributes Attributes {get;}
 
                public
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                virtual
 #endif
                Type EventHandlerType {
@@ -63,7 +63,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                virtual
 #endif
                bool IsMulticast {get {return true;}}
@@ -79,7 +79,7 @@ namespace System.Reflection {
                [DebuggerHidden]
                [DebuggerStepThrough]
                public
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                virtual
 #endif
                void AddEventHandler (object target, Delegate handler)
@@ -137,7 +137,7 @@ namespace System.Reflection {
                [DebuggerHidden]
                [DebuggerStepThrough]
                public
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                virtual
 #endif
                void RemoveEventHandler (object target, Delegate handler)
index 06d5a2f8720369710213a64e80de7b2c4a0aa8e3..3829cf5e0e83652193baea47ed7d6ae4b1e6ca7e 100644 (file)
@@ -102,7 +102,7 @@ namespace System.Reflection {
                        return Type.EmptyTypes;
                }
 
-#if !NET_4_0 && !MOONLIGHT
+#if !NET_4_0
                public override bool IsGenericMethod {
                        get {
                                return false;
index 8cb5b609fc007f0e210b53351b3f684b89ef31a0..4f2bbce8684de6fb54fc0e6a0b2e91ac70617584 100644 (file)
@@ -48,7 +48,7 @@ namespace System.Reflection {
        [Serializable]
        [ClassInterfaceAttribute (ClassInterfaceType.None)]
        [StructLayout (LayoutKind.Sequential)]
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
        public abstract class Module : ISerializable, ICustomAttributeProvider, _Module {
 #else
        public partial class Module : ISerializable, ICustomAttributeProvider, _Module {
@@ -69,7 +69,7 @@ namespace System.Reflection {
                const BindingFlags defaultBindingFlags = 
                        BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                protected
 #else
                internal
@@ -315,7 +315,7 @@ namespace System.Reflection {
 
 #endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
                public virtual Assembly Assembly {
                        get { throw CreateNIE (); }
index b861da70e00c7ec541394c814b7e50dc310ef39a..35848c67299e8b1fb7278f9099162b55970ac91b 100644 (file)
@@ -37,7 +37,7 @@ using System.Collections.Generic;
 
 namespace System.Reflection {
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
        [ComVisible (true)]
        [ComDefaultInterfaceAttribute (typeof (_Assembly))]
        [Serializable]
@@ -47,7 +47,7 @@ namespace System.Reflection {
        public partial class Assembly {
 #endif
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Type GetType (string name, bool throwOnError, bool ignoreCase)
@@ -59,7 +59,7 @@ namespace System.Reflection {
                        throw new ArgumentException ("name", "Name cannot be empty");
 
                        res = InternalGetType (null, name, throwOnError, ignoreCase);
-#if !(NET_4_0 || MOONLIGHT || MOBILE) && !FULL_AOT_RUNTIME
+#if !(NET_4_0  || MOBILE) && !FULL_AOT_RUNTIME
                        if (res is TypeBuilder) {
                                if (throwOnError)
                                        throw new TypeLoadException (string.Format ("Could not load type '{0}' from assembly '{1}'", name, this));
@@ -70,7 +70,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Module GetModule (String name)
@@ -90,7 +90,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                AssemblyName[] GetReferencedAssemblies () {
@@ -98,7 +98,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Module[] GetModules (bool getResourceModules) {
@@ -117,7 +117,7 @@ namespace System.Reflection {
 
                [MonoTODO ("Always returns the same as GetModules")]
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Module[] GetLoadedModules (bool getResourceModules)
@@ -126,7 +126,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Assembly GetSatelliteAssembly (CultureInfo culture)
@@ -135,7 +135,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Assembly GetSatelliteAssembly (CultureInfo culture, Version version)
@@ -146,7 +146,7 @@ namespace System.Reflection {
                //FIXME remove GetManifestModule under v4, it's a v2 artifact
                [ComVisible (false)]
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Module ManifestModule {
@@ -155,7 +155,6 @@ namespace System.Reflection {
                        }
                }
 
-#if !MOONLIGHT
                public
 #if NET_4_0
                override
@@ -165,8 +164,6 @@ namespace System.Reflection {
                                return get_global_assembly_cache ();
                        }
                }
-#endif
-
        }
 }
 
index 97e3481c9c7e535a3dfb66106cad4c8596f93d36..c963488027ebeddfe43568a26dff262f9986dc1f 100644 (file)
@@ -38,7 +38,7 @@ using System.Security.Permissions;
 
 namespace System.Reflection {
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
        [ComVisible (true)]
        [ComDefaultInterfaceAttribute (typeof (_Module))]
        [Serializable]
@@ -49,7 +49,7 @@ namespace System.Reflection {
 #endif
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Assembly Assembly {
@@ -57,7 +57,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                // Note: we do not ask for PathDiscovery because no path is returned here.
@@ -67,7 +67,7 @@ namespace System.Reflection {
                }
        
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                string ScopeName {
@@ -75,7 +75,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                int MDStreamVersion {
@@ -87,7 +87,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Guid ModuleVersionId {
@@ -96,7 +96,7 @@ namespace System.Reflection {
                        }
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -113,7 +113,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                bool IsResource()
@@ -121,7 +121,7 @@ namespace System.Reflection {
                        return is_resource;
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -136,7 +136,7 @@ namespace System.Reflection {
                        return filtered.ToArray ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -146,7 +146,7 @@ namespace System.Reflection {
                        return MonoCustomAttrs.GetCustomAttributes (this, inherit);
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -156,7 +156,7 @@ namespace System.Reflection {
                        return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -170,7 +170,7 @@ namespace System.Reflection {
                        return (globalType != null) ? globalType.GetField (name, bindingAttr) : null;
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -184,7 +184,7 @@ namespace System.Reflection {
                        return (globalType != null) ? globalType.GetFields (bindingFlags) : new FieldInfo [0];
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -193,7 +193,7 @@ namespace System.Reflection {
                        get { return get_MetadataToken (this); }
                }
                protected
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #else
                virtual
@@ -212,7 +212,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                MethodInfo[] GetMethods (BindingFlags bindingFlags) {
@@ -223,7 +223,7 @@ namespace System.Reflection {
                        return (globalType != null) ? globalType.GetMethods (bindingFlags) : new MethodInfo [0];
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -232,7 +232,7 @@ namespace System.Reflection {
                        ModuleHandle.GetPEKind (out peKind, out machine);
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -246,7 +246,7 @@ namespace System.Reflection {
                        return assembly.InternalGetType (this, className, throwOnError, ignoreCase);
                }
        
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -257,7 +257,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                FieldInfo ResolveField (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
@@ -271,7 +271,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                MemberInfo ResolveMember (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
@@ -286,7 +286,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                MethodBase ResolveMethod (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
@@ -300,7 +300,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                string ResolveString (int metadataToken) {
@@ -314,7 +314,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                Type ResolveType (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
@@ -328,7 +328,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                override
 #endif
                byte[] ResolveSignature (int metadataToken) {
@@ -358,7 +358,7 @@ namespace System.Reflection {
                }
 #endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override
 #else
                public virtual
@@ -368,7 +368,7 @@ namespace System.Reflection {
                        return InternalGetTypes ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public override IList<CustomAttributeData> GetCustomAttributesData () {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
index e072223b36e0b730ea7445999034bc33e3e80593..eabb285ac3c5bf7785487bd373ae4ae9a37a1a3a 100644 (file)
@@ -189,7 +189,7 @@ namespace System.Reflection
                extern int GetMetadataToken ();
 
                public
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                virtual
 #endif
                int MetadataToken {
index 0f9fce9cf0f2af2d2f95d6b7b48b2c03a69832b6..cd321d2dd91ca63bc2c37f5960c7720ed09650fc 100644 (file)
@@ -285,11 +285,9 @@ namespace System.Resources
 
                private string GetResourceFilePath (CultureInfo culture)
                {
-#if !MOONLIGHT
                        if (resourceDir != null)
                                return Path.Combine (resourceDir, GetResourceFileName (culture));
                        else
-#endif
                                return GetResourceFileName (culture);
                }
                
index 9729e6e733d77295005d8172fc1b275b730208eb..5c27fc51a8f184017e98153c352818ef0dcbe916 100644 (file)
@@ -41,9 +41,7 @@ namespace System.Resources
        [ComVisible (true)]
        public class ResourceSet : IDisposable, IEnumerable
        {
-#if !MOONLIGHT
                [NonSerialized]
-#endif
                protected IResourceReader Reader;
                protected Hashtable Table;
                bool resources_read;
index 4abb40fb3a4b5f588c26837ea8b764a978377049..4c1fe8a383dcafd1db13a323f4d0301096d3c0cb 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 using System;
 using System.Collections;
 
index 9ae600ca5884f3409a1f25192e6f350101595ca1..25ff7fdee7dd32b52c3ff4b03592f3563d7dc0a7 100644 (file)
@@ -39,23 +39,6 @@ namespace System.Runtime.CompilerServices
 {
        public static class ContractHelper
        {
-#if MOONLIGHT
-               const string SystemWindowsBrowser = ", System.Windows.Browser, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e";
-               const string HtmlPage = "System.Windows.Browser.HtmlPage" + SystemWindowsBrowser;
-               const string HtmlWindow = "System.Windows.Browser.HtmlWindow" + SystemWindowsBrowser;
-               static MethodInfo alert;
-               static object window;
-
-               static ContractHelper ()
-               {
-                       Type htmlpage = Type.GetType (HtmlPage);
-                       MethodInfo get_window = htmlpage.GetMethod ("get_Window", BindingFlags.Static | BindingFlags.Public);
-                       window = get_window.Invoke (null, null);
-                       Type htmlwindow = Type.GetType (HtmlWindow);
-                       alert = htmlwindow.GetMethod ("Alert", BindingFlags.Instance | BindingFlags.Public);
-               }
-#endif
-
                [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
                [DebuggerNonUserCode]
                public static string RaiseContractFailedEvent (ContractFailureKind failureKind, string userMessage, string conditionText, Exception innerException)
@@ -140,12 +123,6 @@ namespace System.Runtime.CompilerServices
                        if (displayMessage != null) {
                                msg.Append (displayMessage);
                        }
-#if MOONLIGHT
-                       // Silverlight shows a dialog that let you Abort (kill process/browser), Retry or Ignore
-                       // Moonlight will simply warn and ignore (at least until FailFast is implemented)
-                       // using reflection into System.Windows.Browser to popup an browser alert
-                       alert.Invoke (window, new object [] { msg.ToString () });
-#else
                        if (Environment.UserInteractive) {
                                // FIXME: This should trigger an assertion.
                                // But code will never get here at the moment, as Environment.UserInteractive currently
@@ -155,7 +132,6 @@ namespace System.Runtime.CompilerServices
                                // Note that FailFast() currently throws a NotImplementedException()
                                Environment.FailFast(msg.ToString()/*, new ExecutionEngineException()*/);
                        }
-#endif
                }
 
        }
index 20ed7a89d19d4abfffaae0445be52c4d226396e5..d86b08be90e2950a7610a7399a681f01a304fcc9 100644 (file)
@@ -25,7 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Runtime.InteropServices;
index 06121f74cf8dbf5189dc0f3438f6b092e51eb40d..3e94a7fc6806c58f6f5003fea576ab63980d5a52 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 namespace System.Runtime.CompilerServices
 {
index 0132dcd2f37751fb96a0373b44cb985a9ed19204..e57d58f58bd9bb2cda66182bd562d179253345e0 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
 
 namespace System.Runtime.ExceptionServices
 {
index 4cfb7c2b5ebe0b0e7beab6047b350981997e03d5..241dbdab441b3e69268f615e6f0bf631df0f6d8d 100644 (file)
@@ -39,12 +39,10 @@ using System.Reflection;
 using System.Threading;
 
 using System.Runtime.ConstrainedExecution;
-#if !MOONLIGHT
 #if !FULL_AOT_RUNTIME
 using System.Runtime.InteropServices.ComTypes;
 using Mono.Interop;
 #endif
-#endif
 
 namespace System.Runtime.InteropServices
 {
@@ -189,7 +187,7 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-#if !FULL_AOT_RUNTIME && !MOONLIGHT
+#if !FULL_AOT_RUNTIME
                public static object CreateWrapperOfType (object o, Type t)
                {
                        __ComObject co = o as __ComObject;
@@ -272,7 +270,7 @@ namespace System.Runtime.InteropServices
                        FreeHGlobal (s);
                }
 
-#if !FULL_AOT_RUNTIME && !MOONLIGHT
+#if !FULL_AOT_RUNTIME
                public static Guid GenerateGuidForType (Type type)
                {
                        return type.GUID;
@@ -389,7 +387,7 @@ namespace System.Runtime.InteropServices
 
                        return m.GetHINSTANCE ();
                }
-#endif // !MOONLIGHT
+#endif // !FULL_AOT_RUNTIME
 
 #if !FULL_AOT_RUNTIME
                [MonoTODO ("SetErrorInfo")]
@@ -404,7 +402,7 @@ namespace System.Runtime.InteropServices
                {
                        throw new NotImplementedException ();
                }
-#if !MOONLIGHT
+
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern static IntPtr GetIDispatchForObjectInternal (object o);
 
@@ -632,7 +630,6 @@ namespace System.Runtime.InteropServices
                {
                        throw new NotImplementedException ();
                }
-#endif // !NET_2_1
 #endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
@@ -814,7 +811,6 @@ namespace System.Runtime.InteropServices
                }
 
 #if !FULL_AOT_RUNTIME
-#if !MOONLIGHT
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern static int ReleaseComObjectInternal (object co);
 
@@ -839,7 +835,6 @@ namespace System.Runtime.InteropServices
                {
                        throw new NotSupportedException ("MSDN states user code should never need to call this method.");
                }
-#endif // !NET_2_1
 #endif
 
                [ComVisible (true)]
@@ -904,7 +899,6 @@ namespace System.Runtime.InteropServices
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern static IntPtr StringToHGlobalUni (string s);
 
-#if !MOONLIGHT
                public static IntPtr SecureStringToBSTR (SecureString s)
                {
                        if (s == null)
@@ -992,7 +986,6 @@ namespace System.Runtime.InteropServices
                                throw new ArgumentNullException ("s");
                        return SecureStringToCoTaskMemUnicode (s);
                }
-#endif
 
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
                [ComVisible (true)]
@@ -1125,13 +1118,11 @@ namespace System.Runtime.InteropServices
                }
 
 #if !FULL_AOT_RUNTIME
-#if !MOONLIGHT
                public static int FinalReleaseComObject (object o)
                {
                        while (ReleaseComObject (o) != 0);
                        return 0;
                }
-#endif
 #endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
index ac0dc4145bf48cb1de2325e824e43e2cd11404b5..2940358a5877aee045d68a4cdb99aa4914060fcb 100644 (file)
@@ -49,11 +49,7 @@ namespace System.Runtime.InteropServices {
 
                private UnmanagedType utype;
                public UnmanagedType ArraySubType;              
-#if !MOONLIGHT
                public VarEnum SafeArraySubType;
-#else
-               private int SafeArraySubType;
-#endif
                public int SizeConst;
                public int IidParameterIndex;
                public short SizeParamIndex;
index 89263113954df269c80b097b499410870ae00530..3756f1df9b0f3820050a438e0c0a8cc625328698 100644 (file)
@@ -54,7 +54,7 @@ namespace System.Runtime.Remoting.Activation
                                return _constructionActivator;
                        }
                }
-#if !MOONLIGHT
+
                public static IMessage Activate (RemotingProxy proxy, ConstructionCall ctorCall)
                {
                        IMessage response;
@@ -73,7 +73,7 @@ namespace System.Runtime.Remoting.Activation
 
                        return response;
                }
-#endif
+
                public static IMessage RemoteActivate (IConstructionCallMessage ctorCall)
                {
                        try 
@@ -182,7 +182,7 @@ namespace System.Runtime.Remoting.Activation
                        identity.AttachServerObject ((MarshalByRefObject) obj, Threading.Thread.CurrentContext);
 
                        ConstructionCall call = ctorCall as ConstructionCall;
-#if !MOONLIGHT
+
                        if (ctorCall.ActivationType.IsContextful && call != null && call.SourceProxy != null)
                        {
                                call.SourceProxy.AttachIdentity (identity);
@@ -190,7 +190,6 @@ namespace System.Runtime.Remoting.Activation
                                RemotingServices.InternalExecuteMessage (target, ctorCall);
                        }
                        else
-#endif
                                ctorCall.MethodBase.Invoke (obj, ctorCall.Args);
 
                        return new ConstructionResponse (obj, null, ctorCall);
index 2a8b2708d892e8c6fba4d3b586308f7b1136c9ac..6fc10f6879e16aaa3837b2d07dd102aca4ca2389 100644 (file)
@@ -353,7 +353,6 @@ namespace System.Runtime.Remoting.Contexts {
                        callback_object.DoCallBack (deleg);
                }
                
-#if !MOONLIGHT
                public static LocalDataStoreSlot AllocateDataSlot ()
                {
                        return new LocalDataStoreSlot (false);
@@ -414,7 +413,6 @@ namespace System.Runtime.Remoting.Contexts {
                                ctx.datastore [slot.slot] = data;
                        }
                }
-#endif
        }
 
        class DynamicPropertyCollection
index 6bb0fd425aaf272161a2fcca9e8edd86b73f10c1..3e89772cd6808b63fe35bd90763d7e1c6b8022af 100644 (file)
@@ -49,9 +49,7 @@ namespace System.Runtime.Remoting.Messaging
                Type _activationType;
                string _activationTypeName;
                bool _isContextOk;
-#if !MOONLIGHT
                [NonSerialized] RemotingProxy _sourceProxy;
-#endif
 
                public ConstructionCall (IMessage m): base (m)
                {
@@ -157,12 +155,11 @@ namespace System.Runtime.Remoting.Messaging
                {
                        get { return base.Properties; }
                }       
-#if !MOONLIGHT
+
                internal RemotingProxy SourceProxy
                {
                        get { return _sourceProxy; }
                        set {_sourceProxy = value; }
                }
-#endif
        }
 }
index 4bc4d567d20ef77c8f8c28393163c0b757948423..c0a459e986a9ce83edf319661d14f8465a8a1234 100644 (file)
@@ -49,12 +49,8 @@ namespace System.Runtime.Remoting.Proxies {
 
                public virtual MarshalByRefObject CreateInstance (Type serverType)
                {
-#if MOONLIGHT
-                       throw new NotImplementedException ();
-#else
                        RemotingProxy proxy = new RemotingProxy (serverType, ChannelServices.CrossContextUrl, null);
                        return (MarshalByRefObject) proxy.GetTransparentProxy();
-#endif
                }
 
                public virtual RealProxy CreateProxy (ObjRef objRef, Type serverType, object serverObject, Context serverContext)
index fb0b4acb130ccf2f0e59ee43245c79c2323181bd..745c16134451013c22fa87c1e42c13a3a43e0f53 100644 (file)
@@ -164,11 +164,7 @@ namespace System.Runtime.Remoting.Proxies
                        MonoMethodMessage mMsg = (MonoMethodMessage) msg;
                        mMsg.LogicalCallContext = CallContext.CreateLogicalCallContext (true);
                        CallType call_type = mMsg.CallType;
-#if MOONLIGHT
-                       bool is_remproxy = false;
-#else
                        bool is_remproxy = (rp is RemotingProxy);
-#endif
 
                        out_args = null;
                        IMethodReturnMessage res_msg = null;
@@ -183,11 +179,9 @@ namespace System.Runtime.Remoting.Proxies
                        // Check for constructor msg
                        if (mMsg.MethodBase.IsConstructor) 
                        {
-#if !MOONLIGHT
                                if (is_remproxy) 
                                        res_msg = (IMethodReturnMessage) (rp as RemotingProxy).ActivateRemoteObject ((IMethodMessage) msg);
                                else 
-#endif
                                        msg = new ConstructionCall (rp.GetProxiedType ());
                        }
                                
index ba7e5f4e1e2a535284c162260bd882da77683faa..1d206f66b1dddb21980cd4bfc55551252f51b0f1 100644 (file)
@@ -545,9 +545,6 @@ namespace System.Runtime.Remoting
        
                internal static object CreateClientProxy (Type objectType, string url, object[] activationAttributes)
                {
-#if MOONLIGHT
-                       throw new NotSupportedException ();
-#else
                        string activationUrl = url;
                        if (!activationUrl.EndsWith ("/"))
                                activationUrl += "/";
@@ -558,7 +555,6 @@ namespace System.Runtime.Remoting
 
                        RemotingProxy proxy = new RemotingProxy (objectType, activationUrl, activationAttributes);
                        return proxy.GetTransparentProxy();
-#endif
                }
        
                internal static object CreateClientProxy (WellKnownClientTypeEntry entry)
@@ -575,12 +571,8 @@ namespace System.Runtime.Remoting
                                if (att != null)
                                        return att.CreateInstance (type);
                        }
-#if MOONLIGHT
-                       throw new NotSupportedException ();
-#else
                        RemotingProxy proxy = new RemotingProxy (type, ChannelServices.CrossContextUrl, activationAttributes);
                        return proxy.GetTransparentProxy();
-#endif
                }
 #if !NET_2_1
                internal static object CreateClientProxyForComInterop (Type type)
@@ -672,7 +664,6 @@ namespace System.Runtime.Remoting
 
                                // Registers the identity
                                uri_hash [uri] = identity;
-#if !MOONLIGHT
                                if (proxyType != null)
                                {
                                        RemotingProxy proxy = new RemotingProxy (proxyType, identity);
@@ -683,7 +674,6 @@ namespace System.Runtime.Remoting
                                        clientProxy = proxy.GetTransparentProxy();
                                        identity.ClientProxy = (MarshalByRefObject) clientProxy;
                                }
-#endif
                                return identity;
                        }
                }
index ffe5b4320df8081c106ae61ecf9458606173de92..f6df7a26574c39585ea91c5532a553ca2d452fdb 100644 (file)
@@ -81,13 +81,11 @@ namespace System.Runtime.Serialization.Formatters.Binary
 
                        // TimeStamp does not have a TypeCode, so it is managed as a special
                        // case in GetTypeCode()
-#if !MOONLIGHT
                        // This environment variable is only for test and benchmarking purposes.
                        // By default, mono will always use IL generated class serializers.
                        string s = Environment.GetEnvironmentVariable("MONO_REFLECTION_SERIALIZER");
                        if (s == null) s = "no";
                        UseReflectionSerialization = (s != "no");
-#endif
                }
 
                public static bool IsPrimitive (Type type)
index 79b259f66785978d0808df3f2e6341a4558ab5d6..6e4f00ccfb3ef81f596e7f361ca63c86e1aff0f0 100644 (file)
@@ -61,11 +61,7 @@ namespace System.Runtime.Serialization
 
                        int IHashCodeProvider.GetHashCode (object o)
                        {
-#if !INSIDE_CORLIB && MOONLIGHT
-                               return o == null ? 0 : o .GetHashCode ();
-#else
                                return object.InternalGetHashCode (o);
-#endif
                        }
                }
                
index 969a130545818e64e2bd815a69e32d9bbb1a38f4..557c6f4bdfd87c1ec1c6088450f2bc953729f411 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
 
 namespace System.Runtime.Versioning
 {
index d068e653b4c74f41be1c04cc1db75b23156f4ebd..df843aeff87d4102ef4b7e896e402d38d622a578 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
 
 namespace System.Runtime.Versioning
 {
index bf951cc1b754785650103316c64d2a9971ebedbd..ebe0dc21e890d112d359766fb5750cf8edbe4386 100644 (file)
@@ -27,7 +27,7 @@
 //
 using System;
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 namespace System.Runtime.Versioning
 {
        [AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
index 97712f90c57455e534d0a80b022b09679df6eac8..e2e5f793f3c84aba8d6e14c7956f087479b9ea53 100644 (file)
@@ -36,9 +36,7 @@ using Mono.Security;
 using Mono.Security.X509;
 
 using System.Runtime.Serialization;
-#if !MOONLIGHT
 using Mono.Security.Authenticode;
-#endif
 
 namespace System.Security.Cryptography.X509Certificates {
 
@@ -100,7 +98,6 @@ namespace System.Security.Cryptography.X509Certificates {
                        return new X509Certificate (data);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("Incomplete - minimal validation in this version")]
                public static X509Certificate CreateFromSignedFile (string filename)
                {
@@ -121,8 +118,6 @@ namespace System.Security.Cryptography.X509Certificates {
                        throw new CryptographicException (Locale.GetText ("{0} isn't signed.", filename));
                }
 
-#endif // NET_2_1
-
                // constructors
        
                // special constructor for Publisher (and related classes).
@@ -152,7 +147,6 @@ namespace System.Security.Cryptography.X509Certificates {
 #endif
                }
 
-#if !MOONLIGHT
                [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                private void InitFromHandle (IntPtr handle)
                {
@@ -165,7 +159,6 @@ namespace System.Security.Cryptography.X509Certificates {
                        }
                        // for 1.x IntPtr.Zero results in an "empty" certificate instance
                }
-#endif
        
                public X509Certificate (System.Security.Cryptography.X509Certificates.X509Certificate cert) 
                {
index 21ff22e3dc48d11e7e9d1b713053ae937c473dd4..f3c4a8b277d6513d6b261aceb4e4a5af9c63baa3 100644 (file)
@@ -41,11 +41,7 @@ namespace System.Security.Cryptography.X509Certificates {
 
        [ComVisible (true)]
        [MonoTODO ("X509ContentType.SerializedCert isn't supported (anywhere in the class)")]
-#if MOONLIGHT
-       public partial class X509Certificate {
-#else
        public partial class X509Certificate : IDeserializationCallback, ISerializable {
-#endif
                private string issuer_name;
                private string subject_name;
 
@@ -60,26 +56,22 @@ namespace System.Security.Cryptography.X509Certificates {
                        Import (rawData, password, X509KeyStorageFlags.DefaultKeySet);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("SecureString support is incomplete")]
                public X509Certificate (byte[] rawData, SecureString password)
                {
                        Import (rawData, password, X509KeyStorageFlags.DefaultKeySet);
                }
-#endif
 
                public X509Certificate (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
                {
                        Import (rawData, password, keyStorageFlags);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("SecureString support is incomplete")]
                public X509Certificate (byte[] rawData, SecureString password, X509KeyStorageFlags keyStorageFlags)
                {
                        Import (rawData, password, keyStorageFlags);
                }
-#endif
 
                public X509Certificate (string fileName)
                {
@@ -91,26 +83,22 @@ namespace System.Security.Cryptography.X509Certificates {
                        Import (fileName, password, X509KeyStorageFlags.DefaultKeySet);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("SecureString support is incomplete")]
                public X509Certificate (string fileName, SecureString password)
                {
                        Import (fileName, password, X509KeyStorageFlags.DefaultKeySet);
                }
-#endif
 
                public X509Certificate (string fileName, string password, X509KeyStorageFlags keyStorageFlags)
                {
                        Import (fileName, password, keyStorageFlags);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("SecureString support is incomplete")]
                public X509Certificate (string fileName, SecureString password, X509KeyStorageFlags keyStorageFlags)
                {
                        Import (fileName, password, keyStorageFlags);
                }
-#endif
 
                public X509Certificate (SerializationInfo info, StreamingContext context)
                {
@@ -171,14 +159,12 @@ namespace System.Security.Cryptography.X509Certificates {
                        return Export (contentType, pwd);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("X509ContentType.Pfx/Pkcs12 and SerializedCert are not supported. SecureString support is incomplete.")]
                public virtual byte[] Export (X509ContentType contentType, SecureString password)
                {
                        byte[] pwd = (password == null) ? null : password.GetBuffer ();
                        return Export (contentType, pwd);
                }
-#endif
 
                internal byte[] Export (X509ContentType contentType, byte[] password)
                {
@@ -189,14 +175,12 @@ namespace System.Security.Cryptography.X509Certificates {
                                switch (contentType) {
                                case X509ContentType.Cert:
                                        return x509.RawData;
-#if !MOONLIGHT
                                case X509ContentType.Pfx: // this includes Pkcs12
                                        // TODO
                                        throw new NotSupportedException ();
                                case X509ContentType.SerializedCert:
                                        // TODO
                                        throw new NotSupportedException ();
-#endif
                                default:
                                        string msg = Locale.GetText ("This certificate format '{0}' cannot be exported.", contentType);
                                        throw new CryptographicException (msg);
@@ -256,13 +240,11 @@ namespace System.Security.Cryptography.X509Certificates {
                        }
                }
 
-#if !MOONLIGHT
                [MonoTODO ("SecureString support is incomplete")]
                public virtual void Import (byte[] rawData, SecureString password, X509KeyStorageFlags keyStorageFlags)
                {
                        Import (rawData, (string)null, keyStorageFlags);
                }
-#endif
 
                [ComVisible (false)]
                public virtual void Import (string fileName)
@@ -279,16 +261,13 @@ namespace System.Security.Cryptography.X509Certificates {
                        Import (rawData, password, keyStorageFlags);
                }
 
-#if !MOONLIGHT
                [MonoTODO ("SecureString support is incomplete, missing KeyStorageFlags support")]
                public virtual void Import (string fileName, SecureString password, X509KeyStorageFlags keyStorageFlags)
                {
                        byte[] rawData = Load (fileName);
                        Import (rawData, (string)null, keyStorageFlags);
                }
-#endif
 
-#if !MOONLIGHT
                void IDeserializationCallback.OnDeserialization (object sender)
                {
                }
@@ -298,7 +277,7 @@ namespace System.Security.Cryptography.X509Certificates {
                        // will throw a NRE if info is null (just like MS implementation)
                        info.AddValue ("RawData", x509.RawData);
                }
-#endif
+
                [ComVisible (false)]
                public virtual void Reset ()
                {
index e7b0f14a554833a850974cbd370bc7cbdb3276a8..42fca5acade25e2980a400e91e84ff259bcd6fd9 100644 (file)
@@ -37,7 +37,6 @@ namespace System.Security.Cryptography.X509Certificates {
        enum X509ContentType {
                Unknown,
                Cert,
-#if !MOONLIGHT
                // not supported by Silverlight 2.0 (NET_2_1)
                SerializedCert,
                Pfx,
@@ -45,6 +44,5 @@ namespace System.Security.Cryptography.X509Certificates {
                Pkcs7,
                Authenticode,
                Pkcs12 = Pfx
-#endif
        }
 }
index b7b2d9e62d71eedbcc63bd584102fcf2550edf72..ce375c2aeacecde9a7cf1cb2878da7bb7a067072 100644 (file)
@@ -35,14 +35,12 @@ namespace System.Security.Cryptography.X509Certificates {
        [ComVisible (true)]
        public enum X509KeyStorageFlags {
                DefaultKeySet = 0,
-#if !MOONLIGHT
                // not supported by Silverlight 2.0 (NET_2_1)
                UserKeySet = 1,
                MachineKeySet = 2,
                Exportable = 4,
                UserProtected = 8,
                PersistKeySet = 16 
-#endif
        }
 }
 
index 7720549e95b3a51cbc7b73235eebc8d16ab31ba3..fb04371d255541121980b291524f9e50a879e312 100644 (file)
@@ -30,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT && !FULL_AOT_RUNTIME
+#if !FULL_AOT_RUNTIME
 
 using System.Collections;
 using System.Collections.Generic;
index 97c280b563b01f93be89983766237ad90cf144c6..d3fda3b349ba317fc5ada3e2074880c33da3c409 100644 (file)
@@ -124,42 +124,6 @@ namespace System.Security.Cryptography {
                        }
                        return num;
                }
-#if MOONLIGHT
-               // we need SHA1 support to verify the codecs binary integrity
-               public static string MapNameToOID (string name)
-               {
-                       if ((name != null) && name.Contains ("SHA1"))
-                               return "1.3.14.3.2.26";
-                       return String.Empty;
-               }
-
-               private const string AES = "System.Security.Cryptography.AesManaged, System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
-
-               // non-configurable (versus machine.config) mappings for Moonlight (to avoid loading custom code)
-               public static object CreateFromName (string name)
-               {
-                       switch (name) {
-                       case "System.Security.Cryptography.HashAlgorithm":
-                       case "System.Security.Cryptography.SHA1":
-                       case "SHA1":
-                               return new SHA1Managed ();
-                       case "SHA256":
-                               return new SHA256Managed ();
-                       case "System.Security.Cryptography.MD5":
-                       case "MD5":
-                               return new MD5CryptoServiceProvider ();
-                       case "System.Security.Cryptography.RandomNumberGenerator":
-                               return new RNGCryptoServiceProvider ();
-                       case "System.Security.Cryptography.RSA":
-                               return new Mono.Security.Cryptography.RSAManaged ();
-                       case "AES":
-                       case AES:
-                               return (Aes) Activator.CreateInstance (Type.GetType (AES), null);
-                       default:
-                               throw new NotImplementedException (name);
-                       }
-               }
-#endif
        }
 }
 
index 6c4f84ea3b795ec521ae5decd8106005f137ba53..7f561f62c4507c3087c4c10cc1c1138d20112041 100644 (file)
@@ -31,8 +31,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.IO;
 using System.Globalization;
 using System.Runtime.InteropServices;
@@ -293,6 +291,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
-
index a84aee8a3d66976e8ef2c38b66d02c7bb40f47ef..f7414bf379bf6268e32ec0b077b8869fdf280d47 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
@@ -58,5 +56,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
index 0a039c5801be78a0df77851ad7524e24303c5ac1..2ccc52ef35b4a3f9a37d4cbac21a8fbb41d7e1ff 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
@@ -51,5 +49,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
index 007caf5129930014fc1a74c35dc22eaeb458ed00..a88377c04595788dfc6c1fef37f18e6bdc7a8ff7 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
@@ -71,5 +69,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
index 562d40d6f59580bad385708832796c853f591484..eb40da4a94ffb56b547cfa5b53fff3b00d811a4e 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
@@ -71,5 +69,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
index 393b872bc7d447fb2eed3155d844e87302c99c6b..270735f28b6b8675abc86f5f89f969f0d0d7b037 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
@@ -146,6 +144,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
-
index 4d67a691ec3cac2ffd467984ae52e38b1f96b7ed..e34a1541d010c4af8c364bc28084eadc0c12802e 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 namespace System.Security.Cryptography {
@@ -69,5 +67,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
index 2383b2612138d63cade21f4ff154a8a78f0954f3..1052ee0ff307f376a264fc81cfec09602422ecde 100644 (file)
@@ -30,8 +30,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 namespace System.Security.Cryptography {
@@ -439,5 +437,3 @@ namespace System.Security.Cryptography {
                private const int BLOCK_SIZE_BYTES =  64;
        }
 }
-
-#endif
index e0ffb2e8e8b50e5b0ef58b367a8f29fedc23b188..f70ac329846d96cf935779aa656eb4909050e6fa 100644 (file)
@@ -146,7 +146,7 @@ namespace System.Security.Cryptography {
                        }
                }
 
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                protected override void Dispose (bool disposing)
                {
                        base.Dispose (disposing);
index af8e8fb64e80acd366f289155ba501efbeecc72e..4c14453e4ed6944d6155154b44c73c2589bace7b 100644 (file)
@@ -29,8 +29,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.IO;
 using System.Runtime.InteropServices;
 
@@ -408,6 +406,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
-
index 0988ca548091ac846da7a7de5c66df0a0f04e867..d367997770d0d76f5297b3db9f6f1a1462c68e81 100644 (file)
@@ -71,7 +71,7 @@ namespace System.Security.Cryptography {
 #endif
                
                
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                public void Dispose ()
                {
                        Dispose (true);
index bf4a7e95ae914a51de0e3ffaed4f76bcda0961da..877f4ffda21ecbe40feced63cfbfea11a83fb34b 100644 (file)
@@ -1,10 +1,10 @@
-//\r
-// System.Security.Cryptography.Rijndael.cs\r
-//\r
-// Authors: Dan Lewis (dihlewis@yahoo.co.uk)\r
-//          Andrew Birkett (andy@nobugs.org)\r
-//\r
-// (C) 2002\r
+//
+// System.Security.Cryptography.Rijndael.cs
+//
+// Authors: Dan Lewis (dihlewis@yahoo.co.uk)
+//          Andrew Birkett (andy@nobugs.org)
+//
+// (C) 2002
 // Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-\r
 using System.Runtime.InteropServices;
-\r
-namespace System.Security.Cryptography {\r
+
+namespace System.Security.Cryptography {
 
        // References:
        // a.   FIPS PUB 197: Advanced Encryption Standard
        //      http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
-\r
+
        [ComVisible (true)]
-       public abstract class Rijndael : SymmetricAlgorithm {\r
-\r
-               public static new Rijndael Create () \r
-               {\r
+       public abstract class Rijndael : SymmetricAlgorithm {
+
+               public static new Rijndael Create () 
+               {
 #if FULL_AOT_RUNTIME
                        return new System.Security.Cryptography.RijndaelManaged ();
 #else
-                       return Create ("System.Security.Cryptography.Rijndael");\r
+                       return Create ("System.Security.Cryptography.Rijndael");
 #endif
-               }\r
-\r
-               public static new Rijndael Create (string algName) \r
-               {\r
-                       return (Rijndael) CryptoConfig.CreateFromName (algName);\r
-               }\r
+               }
+
+               public static new Rijndael Create (string algName) 
+               {
+                       return (Rijndael) CryptoConfig.CreateFromName (algName);
+               }
 
                protected Rijndael ()
-               {\r
-                       KeySizeValue = 256;\r
-                       BlockSizeValue = 128;\r
-                       FeedbackSizeValue = 128;\r
-       \r
-                       LegalKeySizesValue = new KeySizes [1];\r
-                       LegalKeySizesValue [0] = new KeySizes (128, 256, 64);\r
-\r
-                       LegalBlockSizesValue = new KeySizes [1];\r
-                       LegalBlockSizesValue [0] = new KeySizes (128, 256, 64);\r
-               }\r
-       }\r
-}\r
-#endif
+               {
+                       KeySizeValue = 256;
+                       BlockSizeValue = 128;
+                       FeedbackSizeValue = 128;
+       
+                       LegalKeySizesValue = new KeySizes [1];
+                       LegalKeySizesValue [0] = new KeySizes (128, 256, 64);
 
+                       LegalBlockSizesValue = new KeySizes [1];
+                       LegalBlockSizesValue [0] = new KeySizes (128, 256, 64);
+               }
+       }
+}
index 511e35d146d770552607ce2816417d378c4faec2..7db3cfd5af82d80b56da6acfb382ba93f4be6fab 100644 (file)
@@ -31,8 +31,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 using Mono.Security.Cryptography;
 
@@ -72,6 +70,3 @@ namespace System.Security.Cryptography {
                }
        }
 }
-
-#endif
-
index e0ce34a4e8b9f501284aedcd30ee396863ca768d..6910f112aae6f247f5b0b3b36665947194eed831 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if  !MOONLIGHT
-
 using Mono.Security.Cryptography;
 using System.Runtime.InteropServices;
 
@@ -1569,5 +1567,3 @@ namespace System.Security.Cryptography {
                #endregion
        }
 }
-
-#endif
index 465adc8f35bf358b68c97223b7235b18d9e69c80..161d5b964a6f99457cd3b23aa1f226aa1542e795 100644 (file)
@@ -316,8 +316,6 @@ namespace System.Security.Cryptography {
                }
        }
 
-#if !MOONLIGHT
-
        [ComVisible (true)]
        public sealed class SHA1CryptoServiceProvider : SHA1 {
 
@@ -356,5 +354,4 @@ namespace System.Security.Cryptography {
                        sha.Initialize ();
                }
        }
-#endif // NET_2_1
 }
index 93b6f7f64de27d2cc387e47da57632b015c2b75b..4a6fc51a60ac15766456061d5d434c939e5e9185 100644 (file)
@@ -1,12 +1,12 @@
-//\r
-// System.Security.Cryptography SHA384 Class implementation\r
-//\r
-// Authors:\r
-//   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)\r
+//
+// System.Security.Cryptography SHA384 Class implementation
+//
+// Authors:
+//   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)
 //   Sebastien Pouliot <sebastien@ximian.com>
-//\r
-// Copyright 2001 by Matthew S. Ford.\r
-// Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)\r
+//
+// Copyright 2001 by Matthew S. Ford.
+// Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)
 // Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
-\r
-namespace System.Security.Cryptography {\r
+
+namespace System.Security.Cryptography {
 
        [ComVisible (true)]
-       public abstract class SHA384 : HashAlgorithm {\r
+       public abstract class SHA384 : HashAlgorithm {
 
                protected SHA384 ()
-               {\r
-                       HashSizeValue = 384;\r
-               }\r
-\r
-               public static new SHA384 Create () \r
-               {\r
+               {
+                       HashSizeValue = 384;
+               }
+
+               public static new SHA384 Create () 
+               {
 #if FULL_AOT_RUNTIME
                        return new System.Security.Cryptography.SHA384Managed ();
 #else
-                       return Create ("System.Security.Cryptography.SHA384");\r
+                       return Create ("System.Security.Cryptography.SHA384");
 #endif
-               }\r
-       \r
-               public static new SHA384 Create (string hashName) \r
-               {\r
-                       return (SHA384) CryptoConfig.CreateFromName (hashName);\r
-               }\r
-       }\r
-}\r
-#endif
-
+               }
+       
+               public static new SHA384 Create (string hashName) 
+               {
+                       return (SHA384) CryptoConfig.CreateFromName (hashName);
+               }
+       }
+}
index 43495bef6b11ed4e70869b0dce3bc1f9305e4eab..dd4aee047fc159b55033cf6afc02f8ee0f7e4e25 100644 (file)
@@ -30,8 +30,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 namespace System.Security.Cryptography {
@@ -259,6 +257,3 @@ public class SHA384Managed : SHA384 {
 }
 
 }
-
-#endif
-
index ccded95bfd39e968df2af31b7b2e1546356392fb..46dfb04e9704e2bbdb442e036b0dd53c693d390b 100644 (file)
@@ -1,12 +1,12 @@
-//\r
-// System.Security.Cryptography SHA512 Class implementation\r
-//\r
-// Authors:\r
-//   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)\r
+//
+// System.Security.Cryptography SHA512 Class implementation
+//
+// Authors:
+//   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)
 //   Sebastien Pouliot <sebastien@ximian.com>
-//\r
-// Copyright 2001 by Matthew S. Ford.\r
-// Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)\r
+//
+// Copyright 2001 by Matthew S. Ford.
+// Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)
 // Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
-\r
-namespace System.Security.Cryptography {\r
+
+namespace System.Security.Cryptography {
 
        [ComVisible (true)]
-       public abstract class SHA512 : HashAlgorithm {\r
+       public abstract class SHA512 : HashAlgorithm {
 
                protected SHA512 ()
-               {\r
-                       HashSizeValue = 512;\r
-               }\r
-\r
-               public static new SHA512 Create () \r
-               {\r
+               {
+                       HashSizeValue = 512;
+               }
+
+               public static new SHA512 Create () 
+               {
 #if FULL_AOT_RUNTIME
                        return new System.Security.Cryptography.SHA512Managed ();
 #else
-                       return Create ("System.Security.Cryptography.SHA512");\r
+                       return Create ("System.Security.Cryptography.SHA512");
 #endif
-               }\r
-       \r
-               public static new SHA512 Create (string hashName) \r
-               {\r
-                       return (SHA512) CryptoConfig.CreateFromName (hashName);\r
-               }\r
-       }\r
-}\r
-#endif
-
+               }
+       
+               public static new SHA512 Create (string hashName) 
+               {
+                       return (SHA512) CryptoConfig.CreateFromName (hashName);
+               }
+       }
+}
index 190adeb327e4a6bd42677edac659a615f7469e77..5a4865879c38a279e86dfb061ab19ed599a23032 100644 (file)
@@ -30,8 +30,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 
 namespace System.Security.Cryptography {
@@ -282,6 +280,3 @@ public class SHA512Managed : SHA512 {
 }
 
 }
-
-#endif
-
index 99b41562aef5e07b5075f35377e8b9fff6e210c7..ba713e8c6e5a3b41374f05672ec3e3421147f111 100644 (file)
@@ -42,16 +42,9 @@ namespace System.Security.Cryptography {
                protected byte[] KeyValue; 
                protected KeySizes[] LegalBlockSizesValue; 
                protected KeySizes[] LegalKeySizesValue; 
-#if MOONLIGHT
-               // Silverlight 2.0 only supports CBC
-               internal int FeedbackSizeValue;
-               internal CipherMode ModeValue;
-               internal PaddingMode PaddingValue;
-#else
                protected int FeedbackSizeValue;
                protected CipherMode ModeValue;
                protected PaddingMode PaddingValue;
-#endif
                private bool m_disposed;
 
                protected SymmetricAlgorithm ()
index d5ae1319b1a9e843167d82d26ab50939a9ceea99..f3adcec97d940b93a942f60465d320adca192b55 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Runtime.InteropServices;
 using SSCX = System.Security.Cryptography.X509Certificates;
 
@@ -92,6 +90,3 @@ namespace System.Security.Permissions {
                }
        }
 }
-
-#endif
-
index 9a20872424b1240b7b4db6b678fac80adf0a4a87..f45abac05ea7ae3e0229a172fba7c827b59acff4 100644 (file)
@@ -43,22 +43,22 @@ namespace System.Security.Permissions {
        public enum SecurityAction {
                Demand = 2,
                Assert = 3,
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                [Obsolete ("This requests should not be used")]
 #endif
                Deny = 4,
                PermitOnly = 5,
                LinkDemand = 6,
                InheritanceDemand = 7,
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                [Obsolete ("This requests should not be used")]
 #endif
                RequestMinimum = 8,
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                [Obsolete ("This requests should not be used")]
 #endif
                RequestOptional = 9,
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
                [Obsolete ("This requests should not be used")]
 #endif
                RequestRefuse = 10,
index e4f71881c3eb7b33e28118a1d3822ab5b823a50a..366593159ca19e6ec71316f5a16054c6ececda7c 100644 (file)
@@ -38,10 +38,7 @@ using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Security.Permissions;
 using System.Security.Cryptography.X509Certificates;
-
-#if !MOONLIGHT
 using Mono.Security.Authenticode;
-#endif
 
 namespace System.Security.Policy {
 
index b135cca778d547cdda0cc65bf86a59ff2ba072fe..c0923df14720635c50db1b394ec9a11ce2e9fc46 100644 (file)
@@ -29,8 +29,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.IO;
 using System.Reflection;
 using System.Runtime.InteropServices;
@@ -211,6 +209,3 @@ public sealed class Hash :
 }
 
 }
-
-#endif
-
index 6918f250f85c6ba3b6e522512d6eface402663fa..c645519bed364e740be265235fc55c8436716652 100644 (file)
@@ -28,8 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Collections;
 using System.Globalization;
 using System.Reflection;
@@ -206,6 +204,3 @@ namespace System.Security.Policy {
                }
        }
 }
-
-#endif
-
index a124af3d3202dd0570c0450508911b6b2d8313ac..d78fe55eb070725940a1eb131c842c88d8ffea72 100644 (file)
@@ -31,8 +31,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Collections; // for IList
 using System.Globalization;
 using System.IO;
@@ -596,6 +594,3 @@ namespace System.Security.Policy {
                }
         }
 }
-
-#endif
-
index 1ea46bef3276f8136d9cbe84cd97010046397cf9..33d406c0178bafd1ef97045adcd065c9556dfbff 100644 (file)
@@ -28,8 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.IO;
 using System.Globalization;
 using System.Security.Permissions;
@@ -158,6 +156,3 @@ namespace System.Security.Policy {
                }
        }
 }
-
-#endif
-
index d3a831b2814bf141f50c7d34621693915cd64de7..abaebc274729f6d259a9afd38c34aca8aff037da 100644 (file)
@@ -28,8 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !MOONLIGHT
-
 using System.Collections;
 using System.Globalization;
 using System.Runtime.InteropServices;
@@ -139,6 +137,3 @@ namespace System.Security.Policy {
                 }
         }
 }
-
-#endif
-
index d045a2a9498daffd67a0e13d49852c6a5e9cd44b..09c99b0f8114d77b5e888e38bb305c1a69e39c0f 100644 (file)
@@ -32,11 +32,7 @@ using System.Runtime.InteropServices;
 namespace System.Security {
 
        [ComVisible (true)]
-#if MOONLIGHT
-       public interface IPermission {
-#else
        public interface IPermission : ISecurityEncodable {
-#endif
                IPermission Copy ();
 
                void Demand ();
index 340c8764386c62a6dc3b0e4aa48b85d5a2c48895..13980f5d767712bcfcda735069190006226bf437 100644 (file)
@@ -53,7 +53,6 @@ namespace System.Security {
        }
 #pragma warning restore 649    
 
-#if !MOONLIGHT
        internal struct SecurityFrame {
 
                private AppDomain _domain;
@@ -185,5 +184,4 @@ namespace System.Security {
                        return al;
                }
        }
-#endif
 }
index 68642461eb6140057c1e8b4c8ca27fdb4ef98b3a..39320b1c4d728117d952496c701a42388c39da1c 100644 (file)
@@ -97,7 +97,7 @@ namespace System.Security {
                        return true; // always true outside Moonlight
                }
 
-               [Conditional ("MOONLIGHT")]
+               [Conditional ("ENABLE_SANDBOX")] //??
                internal static void EnsureElevatedPermissions ()
                {
                        // do nothing outside of Moonlight
index 2963cbfd2cd166250ff2122858e3125d6e006cf8..06d0807c7fa5cf93f4fd0a86bd8cfcc0288b6b6e 100644 (file)
@@ -28,9 +28,7 @@
 
 namespace System.Security {
 
-#if !MOONLIGHT
        [MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
-#endif
        [AttributeUsage (AttributeTargets.Delegate | AttributeTargets.Interface | AttributeTargets.Field | AttributeTargets.Method |
                        AttributeTargets.Constructor | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
        public sealed class SecuritySafeCriticalAttribute : Attribute {
index ef89603dbf601ebe43f225e7acfc306d4a00189d..92e94ca3dda9473f8af6ba8bc3011b47dfc7d436 100644 (file)
@@ -28,9 +28,7 @@
 
 namespace System.Security {
 
-#if MOONLIGHT
        [MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
-#endif
        [AttributeUsage (AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
        public sealed class SecurityTransparentAttribute : Attribute {
 
index 76ea02fcbd900e09392b4ec18eed08c7bd9f6a0d..6bdfa5461123832db291d81731942067f5456df1 100644 (file)
@@ -444,13 +444,10 @@ public abstract class Encoding : ICloneable
                        case UnicodeEncoding.BIG_UNICODE_CODE_PAGE:
                                return BigEndianUnicode;
 
-#if !MOONLIGHT
                        case Latin1Encoding.ISOLATIN_CODE_PAGE:
                                return ISOLatin1;
-#endif
                        default: break;
                }
-#if !MOONLIGHT
                // Try to obtain a code page handler from the I18N handler.
                Encoding enc = (Encoding)(InvokeI18N ("GetEncoding", codepage));
                if (enc != null) {
@@ -478,7 +475,6 @@ public abstract class Encoding : ICloneable
                        enc.is_readonly = true;
                        return enc;
                }
-#endif // !NET_2_1
                // We have no idea how to handle this code page.
                throw new NotSupportedException
                        (String.Format ("CodePage {0} not supported", codepage.ToString ()));
@@ -494,8 +490,6 @@ public abstract class Encoding : ICloneable
                return e;
        }
 
-#if !MOONLIGHT
-
        public static Encoding GetEncoding (int codepage,
                EncoderFallback encoderFallback, DecoderFallback decoderFallback)
        {
@@ -526,8 +520,6 @@ public abstract class Encoding : ICloneable
                return e;
        }
 
-#endif // !NET_2_1
-
        static EncodingInfo [] encoding_infos;
 
        // FIXME: As everyone would agree, this implementation is so *hacky*
@@ -565,7 +557,6 @@ public abstract class Encoding : ICloneable
                return encoding_infos;
        }
 
-#if !MOONLIGHT
        [ComVisible (false)]
        public bool IsAlwaysNormalized ()
        {
@@ -578,7 +569,6 @@ public abstract class Encoding : ICloneable
                // umm, ASCIIEncoding should have overriden this method, no?
                return form == NormalizationForm.FormC && this is ASCIIEncoding;
        }
-#endif // NET_2_1
 
        // Get an encoding object for a specific web encoding name.
        public static Encoding GetEncoding (string name)
@@ -639,14 +629,11 @@ public abstract class Encoding : ICloneable
                case "utf_32be":
                        return GetEncoding (UTF32Encoding.BIG_UTF32_CODE_PAGE);
 
-#if !MOONLIGHT
                case "iso_8859_1":
                case "latin1":
                        return GetEncoding (Latin1Encoding.ISOLATIN_CODE_PAGE);
-#endif
                }
                
-#if !MOONLIGHT
                // Try to obtain a web encoding handler from the I18N handler.
                Encoding enc = (Encoding)(InvokeI18N ("GetEncoding", name));
                if (enc != null) {
@@ -670,7 +657,6 @@ public abstract class Encoding : ICloneable
                if (type != null) {
                        return (Encoding)(Activator.CreateInstance (type));
                }
-#endif
                // We have no idea how to handle this encoding name.
                throw new ArgumentException (String.Format ("Encoding name '{0}' not "
                        + "supported", name), "name");
@@ -885,27 +871,17 @@ public abstract class Encoding : ICloneable
                                                                case 3: code_page = UTF8Encoding.UTF8_CODE_PAGE; break;
                                                                case 4: code_page = UnicodeEncoding.UNICODE_CODE_PAGE; break;
                                                                case 5: code_page = UnicodeEncoding.BIG_UNICODE_CODE_PAGE; break;
-#if !MOONLIGHT
                                                                case 6: code_page = Latin1Encoding.ISOLATIN_CODE_PAGE; break;
-#endif
                                                                }
                                                                defaultEncoding = GetEncoding (code_page);
                                                        }
                                                } catch (NotSupportedException) {
-#if MOONLIGHT
-                                                       defaultEncoding = UTF8;
-#else
                                                        // code_page is not supported on underlying platform
                                                        defaultEncoding = UTF8Unmarked;
-#endif
                                                } catch (ArgumentException) {
                                                        // code_page_name is not a valid code page, or is 
                                                        // not supported by underlying OS
-#if MOONLIGHT
-                                                       defaultEncoding = UTF8;
-#else
                                                        defaultEncoding = UTF8Unmarked;
-#endif
                                                }
                                                defaultEncoding.is_readonly = true;
 #endif
@@ -917,7 +893,6 @@ public abstract class Encoding : ICloneable
                }
        }
 
-#if !MOONLIGHT
 
        // Get the ISO Latin1 encoding object.
        private static Encoding ISOLatin1
@@ -936,8 +911,6 @@ public abstract class Encoding : ICloneable
                }
        }
 
-#endif
-
        // Get the standard UTF-7 encoding object.
 #if ECMA_COMPAT
        private
index bfc8a8925e5db98a753853492dbdb5598a6b0016..4fd1612ba9646ff5220e73e89f3241e87c2160ea 100644 (file)
@@ -505,7 +505,7 @@ namespace System.Text {
                        return this;
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public StringBuilder Clear ()
                {
                        Length = 0;
@@ -538,31 +538,19 @@ namespace System.Text {
                        return this;
                }
 
-#if MOONLIGHT
-               internal
-#else
                public
-#endif
                StringBuilder AppendFormat (string format, object arg0)
                {
                        return AppendFormat (null, format, new object [] { arg0 });
                }
 
-#if MOONLIGHT
-               internal
-#else
                public
-#endif
                StringBuilder AppendFormat (string format, object arg0, object arg1)
                {
                        return AppendFormat (null, format, new object [] { arg0, arg1 });
                }
 
-#if MOONLIGHT
-               internal
-#else
                public
-#endif
                StringBuilder AppendFormat (string format, object arg0, object arg1, object arg2)
                {
                        return AppendFormat (null, format, new object [] { arg0, arg1, arg2 });
index 742c30644add915175118d6cee8fbf605ebe5b83..b9bf96762dfcbb097dd3bde4c751b5ba150a3ee5 100644 (file)
@@ -40,9 +40,7 @@ namespace System.Threading {
                , IDisposable
 #endif
        {
-#if !MOONLIGHT
                private SecurityContext _sc;
-#endif
                private LogicalCallContext _lcc;
                private bool _suppressFlow;
                private bool _capture;
@@ -53,10 +51,8 @@ namespace System.Threading {
 
                internal ExecutionContext (ExecutionContext ec)
                {
-#if !MOONLIGHT
                        if (ec._sc != null)
                                _sc = new SecurityContext (ec._sc);
-#endif
                        _suppressFlow = ec._suppressFlow;
                        _capture = true;
                }
@@ -79,10 +75,8 @@ namespace System.Threading {
                                return null;
 
                        ExecutionContext capture = new ExecutionContext (ec);
-#if !MOONLIGHT
                        if (SecurityManager.SecurityEnabled)
                                capture.SecurityContext = SecurityContext.Capture ();
-#endif
 #if !MONOTOUCH
                        capture.LogicalCallContext = CallContext.CreateLogicalCallContext (false);
 #endif
@@ -127,7 +121,6 @@ namespace System.Threading {
                        }
                }
 
-#if !MOONLIGHT
                internal SecurityContext SecurityContext {
                        get {
                                if (_sc == null)
@@ -136,7 +129,6 @@ namespace System.Threading {
                        }
                        set { _sc = value; }
                }
-#endif
                internal bool FlowSuppressed {
                        get { return _suppressFlow; }
                        set { _suppressFlow = value; }
@@ -160,7 +152,6 @@ namespace System.Threading {
                        ec.FlowSuppressed = false;
                }
 
-#if !MOONLIGHT
                [MonoTODO ("only the SecurityContext is considered")]
                [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
                public static void Run (ExecutionContext executionContext, ContextCallback callback, object state)
@@ -190,6 +181,5 @@ namespace System.Threading {
                        t.ExecutionContext.FlowSuppressed = true;
                        return new AsyncFlowControl (t, AsyncFlowControlType.Execution);
                }
-#endif
        }
 }
\ No newline at end of file
index 6ed0f6115a5e5cfc790fb29818156f3ec38f611e..f9341d9bb5ec723c4f371254e899ac2867ecaf89 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 
index e8d47328afec685f827e51bb6a307fb5b1bbf510..bdd72c6c03da60568de42be9c400e72075c17fff 100644 (file)
@@ -189,7 +189,7 @@ namespace System.Threading
                        }
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                extern static void try_enter_with_atomic_var (object obj, int millisecondsTimeout, ref bool lockTaken);
 
index d64983d34e59a0b455272f569779371c8d6cef30..3efe05e2dec1656903c1e07addfde16b105de92f 100644 (file)
@@ -37,9 +37,7 @@ namespace System.Threading
 {
        [ComVisible (true)]
        public sealed class RegisteredWaitHandle
-#if !MOONLIGHT
                : MarshalByRefObject
-#endif
        {
                WaitHandle _waitObject;
                WaitOrTimerCallback _callback;
index 0576cb14d75107e298af4643f0bb5afdf1138da7..bed9aa3acf96b6b8c680bee3f7b1639cf9e361c5 100644 (file)
@@ -184,7 +184,6 @@ namespace System.Threading {
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private extern static byte[] ByteArrayToCurrentDomain (byte[] arr);
 
-#if !MOONLIGHT
                static void DeserializePrincipal (Thread th)
                {
                        MemoryStream ms = new MemoryStream (ByteArrayToCurrentDomain (th.Internal._serialized_principal));
@@ -296,7 +295,6 @@ namespace System.Threading {
                                th.principal = value;
                        }
                }
-#endif
 
                // Looks up the object associated with the current thread
                // this is called by the JIT directly, too
@@ -324,7 +322,6 @@ namespace System.Threading {
                        }
                }
 
-#if !MOONLIGHT
                // Stores a hash keyed by strings of LocalDataStoreSlot objects
                static Hashtable datastorehash;
                private static object datastore_lock = new object ();
@@ -413,7 +410,6 @@ namespace System.Threading {
                                return(slot);
                        }
                }
-#endif
                
                public static AppDomain GetDomain() {
                        return AppDomain.CurrentDomain;
@@ -480,7 +476,6 @@ namespace System.Threading {
                {
                }
 
-#if !MOONLIGHT
                [Obsolete ("Deprecated in favor of GetApartmentState, SetApartmentState and TrySetApartmentState.")]
                public ApartmentState ApartmentState {
                        get {
@@ -494,7 +489,6 @@ namespace System.Threading {
                                TrySetApartmentState (value);
                        }
                }
-#endif // !NET_2_1
 
                //[MethodImplAttribute (MethodImplOptions.InternalCall)]
                //private static extern int current_lcid ();
@@ -606,7 +600,6 @@ namespace System.Threading {
                        }
                }
 
-#if !MOONLIGHT
                public ThreadPriority Priority {
                        get {
                                return(ThreadPriority.Lowest);
@@ -616,7 +609,6 @@ namespace System.Threading {
                                // FIXME: Implement setter.
                        }
                }
-#endif
 
                public ThreadState ThreadState {
                        get {
@@ -633,7 +625,6 @@ namespace System.Threading {
                        Abort_internal (Internal, null);
                }
 
-#if !MOONLIGHT
                [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
                public void Abort (object stateInfo) 
                {
@@ -651,7 +642,6 @@ namespace System.Threading {
                {
                        Interrupt_internal (Internal);
                }
-#endif
 
                // The current thread joins with 'this'. Set ms to 0 to block
                // until this actually exits.
@@ -671,7 +661,6 @@ namespace System.Threading {
                        return Join_internal (Internal, millisecondsTimeout, Internal.system_thread_handle);
                }
 
-#if !MOONLIGHT
                public bool Join(TimeSpan timeout)
                {
                        long ms = (long) timeout.TotalMilliseconds;
@@ -680,12 +669,10 @@ namespace System.Threading {
 
                        return Join_internal (Internal, (int) ms, Internal.system_thread_handle);
                }
-#endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern static void MemoryBarrier ();
 
-#if !MOONLIGHT
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private extern void Resume_internal();
 
@@ -695,7 +682,6 @@ namespace System.Threading {
                {
                        Resume_internal ();
                }
-#endif // !NET_2_1
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern static void SpinWait_nop ();
@@ -712,45 +698,7 @@ namespace System.Threading {
                        }
                }
 
-#if MOONLIGHT
-               private void StartInternal ()
-               {
-                       current_thread = this;
-
-                       try {
-                               if (threadstart is ThreadStart) {
-                                       ((ThreadStart) threadstart) ();
-                               } else {
-                                       ((ParameterizedThreadStart) threadstart) (start_obj);
-                               }
-                       } catch (ThreadAbortException) {
-                               // do nothing
-                       } catch (Exception ex) {
-                               MoonlightUnhandledException (ex);
-                       }
-               }
-
-               static MethodInfo moonlight_unhandled_exception = null;
-
-               static internal void MoonlightUnhandledException (Exception e)
-               {
-                       try {
-                               if (moonlight_unhandled_exception == null) {
-                                       var assembly = System.Reflection.Assembly.Load ("System.Windows, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=7cec85d7bea7798e");
-                                       var application = assembly.GetType ("System.Windows.Application");
-                                       moonlight_unhandled_exception = application.GetMethod ("OnUnhandledException", 
-                                               System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
-                               }
-                               moonlight_unhandled_exception.Invoke (null, new object [] { null, e });
-                       }
-                       catch {
-                               try {
-                                       Console.WriteLine ("Unexpected exception while trying to report unhandled application exception: {0}", e);
-                               } catch {
-                               }
-                       }
-               }
-#elif MONOTOUCH
+#if MONOTOUCH
                static ConstructorInfo nsautoreleasepool_ctor;
                
                IDisposable GetNSAutoreleasePool ()
@@ -797,7 +745,6 @@ namespace System.Threading {
                                throw new SystemException ("Thread creation failed.");
                }
 
-#if !MOONLIGHT
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private extern static void Suspend_internal(InternalThread thread);
 
@@ -807,7 +754,6 @@ namespace System.Threading {
                {
                        Suspend_internal (Internal);
                }
-#endif // !NET_2_1
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                extern private static void SetState (InternalThread thread, ThreadState set);
@@ -995,7 +941,6 @@ namespace System.Threading {
                        // Managed and native threads are currently bound together.
                }
 
-#if !MOONLIGHT
                public ApartmentState GetApartmentState ()
                {
                        return (ApartmentState)Internal.apartment_state;
@@ -1023,7 +968,6 @@ namespace System.Threading {
 
                        return true;
                }
-#endif // !NET_2_1
                
                [ComVisible (false)]
                public override int GetHashCode ()
@@ -1037,7 +981,6 @@ namespace System.Threading {
                        Start ();
                }
 
-#if !MOONLIGHT
                // NOTE: This method doesn't show in the class library status page because
                // it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
                // But it's there!
@@ -1066,8 +1009,6 @@ namespace System.Threading {
                        ExecutionContext.SecurityContext.CompressedStack = stack;
                }
 
-#endif
-
                void _Thread.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
                {
                        throw new NotImplementedException ();
index 97064daaba9f057be0190713d9b451154170b003..1e76495c7409dbe0d7cdb3eaccbd10434059aca1 100644 (file)
@@ -82,9 +82,6 @@ namespace System.Threading {
                        if (callBack == null)
                                throw new ArgumentNullException ("callBack");
 
-#if MOONLIGHT
-                       callBack = MoonlightHandler (callBack);
-#endif
                        if (callBack.IsTransparentProxy ()) {
                                IAsyncResult ar = callBack.BeginInvoke (state, null, null);
                                if (ar == null)
@@ -224,20 +221,6 @@ namespace System.Threading {
                        throw new NotImplementedException ();
                }
 
-#endif
-
-#if MOONLIGHT
-               static WaitCallback MoonlightHandler (WaitCallback callback)
-               {
-                       return delegate (object o) {
-                               try {
-                                       callback (o);
-                               } 
-                               catch (Exception ex) {
-                                       Thread.MoonlightUnhandledException (ex);
-                               } 
-                       };
-               }
 #endif
        }
 }
index 0f084b5fe39b832800f0395ae797878e161fe070..5d41f2388b99ae7df25e1e3c22cf0c96547df37e 100644 (file)
@@ -35,11 +35,7 @@ namespace System.Threading
 {
        [ComVisible (true)]
        public sealed class Timer
-#if MOONLIGHT
-               : IDisposable
-#else
                : MarshalByRefObject, IDisposable
-#endif
        {
                static readonly Scheduler scheduler = Scheduler.Instance;
 #region Timer instance fields
@@ -343,11 +339,7 @@ namespace System.Threading
                                                        list.RemoveAt (i);
                                                        count--;
                                                        i--;
-#if MOONLIGHT
-                                                       ThreadPool.QueueUserWorkItem (TimerCaller, timer);
-#else
                                                        ThreadPool.UnsafeQueueUserWorkItem (TimerCaller, timer);
-#endif
                                                        long period = timer.period_ms;
                                                        long due_time = timer.due_time_ms;
                                                        bool no_more = (period == -1 || ((period == 0 || period == Timeout.Infinite) && due_time != Timeout.Infinite));
index 81ee13c76d24e3fe77a088857dff8ba1085cde65..e633aa2fe98d997ebad9259b1cd85bc5d60336ce 100644 (file)
@@ -42,11 +42,7 @@ namespace System.Threading
        [ComVisible (true)]
        [StructLayout (LayoutKind.Sequential)]
        public abstract class WaitHandle
-#if MOONLIGHT
-               : IDisposable
-#else
                : MarshalByRefObject, IDisposable
-#endif
        {
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private static extern bool WaitAll_internal(WaitHandle[] handles, int ms, bool exitContext);
@@ -243,7 +239,7 @@ namespace System.Threading
                        Dispose(true);
                }
 
-#if NET_4_0 || MOBILE || MOONLIGHT
+#if NET_4_0 || MOBILE
                public void Dispose ()
 #else          
                void IDisposable.Dispose ()
index de7dab6651297bc66b6f06eb70d4c43524f89880..e06c6de6d1adedd7425c3ddea4d0417c04b7dd09 100644 (file)
@@ -66,15 +66,6 @@ namespace System
        public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
        public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6, in T7> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
        public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
-#elif MOONLIGHT
-       [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-       public delegate void Action ();
-
-       public delegate void Action <T> (T obj);
-       public delegate void Action <T1, T2, T3, T4, T5> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
-       public delegate void Action <T1, T2, T3, T4, T5, T6> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
-       public delegate void Action <T1, T2, T3, T4, T5, T6, T7> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
-       public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
 #else
        public delegate void Action <T> (T obj);
        
index db61c741a891fa35a9c5dd548c8f20fbc8565f86..714163ab23b82a0d13ee71e951daa1192fe28006 100644 (file)
@@ -37,10 +37,8 @@ using System.Security.Permissions;
 using System.Security.Policy;
 using System.Configuration.Assemblies;
 using System.Text;
-#if !MOONLIGHT
 using System.Runtime.Remoting;
 using System.Runtime.Remoting.Activation;
-#endif
 
 namespace System 
 {
@@ -58,7 +56,6 @@ namespace System
                {
                }
 
-#if !MOONLIGHT
                [MonoTODO ("No COM support")]
                public static ObjectHandle CreateComInstanceFrom (string assemblyName, string typeName)
                {
@@ -212,7 +209,6 @@ namespace System
                                throw new ArgumentNullException ("domain");
                        return domain.CreateInstance (assemblyName, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, securityAttributes);
                }
-#endif // !NET_2_1
 
                public static T CreateInstance <T> ()
                {
@@ -282,7 +278,6 @@ namespace System
                        }
 
                        CheckAbstractType (type);
-#if !MOONLIGHT
                        if (activationAttributes != null && activationAttributes.Length > 0) {
                                if (!type.IsMarshalByRef) {
                                        string msg = Locale.GetText ("Type '{0}' doesn't derive from MarshalByRefObject.", type.FullName);
@@ -295,7 +290,6 @@ namespace System
                                        return newOb;
                                }
                        }
-#endif
                        return ctor.Invoke (bindingAttr, binder, args, culture);
                }
 
@@ -353,7 +347,6 @@ namespace System
                        }
                }
 
-#if !MOONLIGHT
                [SecurityPermission (SecurityAction.LinkDemand, RemotingConfiguration = true)]
                public static object GetObject (Type type, string url)
                {
@@ -371,7 +364,7 @@ namespace System
 
                        return RemotingServices.Connect (type, url, state);
                }
-#endif
+
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal static extern object CreateInstanceInternal (Type type);
 
index 7032f7054f55087f31adcfc2bd611a1c760c7a4c..75f751a1e74a2d1a2240a3a15f18374b064a5db3 100644 (file)
@@ -60,14 +60,12 @@ using System.Text;
 namespace System {
 
        [ComVisible (true)]
-#if !NET_2_1 || MOONLIGHT
+#if !NET_2_1
        [ComDefaultInterface (typeof (_AppDomain))]
 #endif
        [ClassInterface(ClassInterfaceType.None)]
        [StructLayout (LayoutKind.Sequential)]
-#if MOONLIGHT
-       public sealed class AppDomain : _AppDomain {
-#elif NET_2_1
+#if NET_2_1
        public sealed class AppDomain : MarshalByRefObject, _AppDomain {
 #else
        public sealed class AppDomain : MarshalByRefObject, _AppDomain, IEvidenceFactory {
@@ -87,7 +85,6 @@ namespace System {
 
                [ThreadStatic]
                static Hashtable assembly_resolve_in_progress_refonly;
-#if !MOONLIGHT
                // CAS
                private Evidence _evidence;
                private PermissionSet _granted;
@@ -97,7 +94,7 @@ namespace System {
 
                [ThreadStatic]
                private static IPrincipal _principal;
-#endif
+
                static AppDomain default_domain;
 
                private AppDomain ()
@@ -127,7 +124,6 @@ namespace System {
                        get { throw new NotImplementedException (); }
                }
 #endif
-#if !MOONLIGHT
                public string BaseDirectory {
                        get {
                                string path = SetupInformationNoCopy.ApplicationBase;
@@ -176,7 +172,6 @@ namespace System {
                                return (SetupInformationNoCopy.ShadowCopyFiles == "true");
                        }
                }
-#endif
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern string getFriendlyName ();
@@ -186,7 +181,7 @@ namespace System {
                                return getFriendlyName ();
                        }
                }
-#if !MOONLIGHT
+
                public Evidence Evidence {
                        get {
                                // if the host (runtime) hasn't provided it's own evidence...
@@ -234,7 +229,6 @@ namespace System {
                internal PermissionSet GrantedPermissionSet {
                        get { return _granted; }
                }
-#endif
 
 #if NET_4_0
                public PermissionSet PermissionSet {
@@ -267,8 +261,6 @@ namespace System {
                        }
                }
 
-#if !MOONLIGHT
-
                [Obsolete ("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")]
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
                public void AppendPrivatePath (string path)
@@ -316,7 +308,6 @@ namespace System {
                {
                        return Activator.CreateComInstanceFrom (assemblyFile, typeName, hashValue ,hashAlgorithm);
                }
-#endif
 #endif
 
                public ObjectHandle CreateInstance (string assemblyName, string typeName)
@@ -692,12 +683,10 @@ namespace System {
                        return base.GetType ();
                }
 
-#if !MOONLIGHT
                public override object InitializeLifetimeService ()
                {
                        return null;
                }
-#endif
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal extern Assembly LoadAssembly (string assemblyRef, Evidence securityEvidence, bool refOnly);
@@ -829,7 +818,6 @@ namespace System {
                        assembly.FromByteArray = true;
                        return assembly;
                }
-#if !MOONLIGHT
 #if NET_4_0
                [Obsolete ("AppDomain policy levels are obsolete")]
 #endif
@@ -892,7 +880,7 @@ namespace System {
 
                        _principal = principal;
                }
-#endif
+
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private static extern AppDomain InternalSetDomainByID (int domain_id);
  
@@ -981,8 +969,6 @@ namespace System {
                        return _process_guid;
                }
 
-#if !MOONLIGHT
-
                public static AppDomain CreateDomain (string friendlyName)
                {
                        return CreateDomain (friendlyName, null, null);
@@ -1130,8 +1116,7 @@ namespace System {
 
                        return info;
                }
-#endif // !NET_2_1
-
+               
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private static extern bool InternalIsFinalizingForUnload (int domain_id);
 
@@ -1191,14 +1176,7 @@ namespace System {
 
                public override string ToString ()
                {
-#if !MOONLIGHT
                        return getFriendlyName ();
-#else
-                       StringBuilder sb = new StringBuilder ("Name:");
-                       sb.AppendLine (FriendlyName);
-                       sb.AppendLine ("There are no context policies.");
-                       return sb.ToString ();
-#endif
                }
 
                private static void ValidateAssemblyName (string name)
@@ -1430,8 +1408,6 @@ namespace System {
                        get { return _domain_manager; }
                }
 
-#if (!MOONLIGHT)
-
                public event ResolveEventHandler ReflectionOnlyAssemblyResolve;
 
         #pragma warning disable 649
@@ -1539,15 +1515,6 @@ namespace System {
                        return GetAssemblies (true);
                }
 
-#else // MOONLIGHT
-
-               public int ExecuteAssemblyByName (string assemblyName)
-               {
-                       // critical code in SL that we're not calling in ML
-                       throw new NotImplementedException ();
-               }
-#endif
-
 #if !NET_2_1
                void _AppDomain.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
                {
@@ -1571,7 +1538,7 @@ namespace System {
                }
 #endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                List<string> compatibility_switch;
 
                public bool? IsCompatibilitySwitchSet (string value)
index 12cb693004d4b13f8c5686c4b1c2271466e7d327..cd1decd0b2a71f0146596608401edbc3808731b3 100644 (file)
@@ -38,10 +38,8 @@ using System.Runtime.InteropServices;
 using System.Security;
 using System.Runtime.Serialization.Formatters.Binary;
 
-#if(!MOONLIGHT)
 using System.Runtime.Hosting;
 using System.Security.Policy;
-#endif
 
 namespace System
 {
@@ -71,19 +69,12 @@ namespace System
                bool disallow_binding_redirects;
                bool disallow_code_downloads;
 
-#if (!MOONLIGHT)
                private ActivationArguments _activationArguments;
                AppDomainInitializer domain_initializer;
                [NonSerialized]
                ApplicationTrust application_trust;
                string [] domain_initializer_args;
-#else
-               object _activationArguments;
-               object domain_initializer; // always null
-               [NonSerialized]
-               object application_trust;  // dummy, always null
-               object domain_initializer_args;
-#endif
+
                bool disallow_appbase_probe;
                byte [] configuration_bytes;
 
@@ -118,7 +109,6 @@ namespace System
                        configuration_bytes = setup.configuration_bytes;
                }
 
-#if (!MOONLIGHT)
                public AppDomainSetup (ActivationArguments activationArguments)
                {
                        _activationArguments = activationArguments;
@@ -128,7 +118,6 @@ namespace System
                {
                        _activationArguments = new ActivationArguments (activationContext);
                }
-#endif
 
                static string GetAppBase (string appBase)
                {
@@ -164,7 +153,7 @@ namespace System
                                application_name = value;
                        }
                }
-#if !MOONLIGHT
+
                public string CachePath {
                        get {
                                return cache_path;
@@ -227,7 +216,7 @@ namespace System
                                license_file = value;
                        }
                }
-#endif
+
                [MonoLimitation ("In Mono this is controlled by the --share-code flag")]
                public LoaderOptimization LoaderOptimization {
                        get {
@@ -237,7 +226,7 @@ namespace System
                                loader_optimization = value;
                        }
                }
-#if !MOONLIGHT
+
                public string PrivateBinPath {
                        get {
                                return private_bin_path;
@@ -386,8 +375,8 @@ namespace System
 
                        serialized_non_primitives = ms.ToArray ();
                }
-#endif // !NET_2_1
-#if NET_4_0 || MOONLIGHT || MOBILE
+
+#if NET_4_0 || MOBILE
                [MonoTODO ("not implemented, does not throw because it's used in testing moonlight")]
                public void SetCompatibilitySwitches (IEnumerable<string> switches)
                {
index 8ee31d2069311e906eeb091776402404159e54a3..2092ad42100ba9dc40d66cb2aae5a6d6f19e1df4 100644 (file)
@@ -50,7 +50,7 @@ namespace System
        [ComVisible (true)]
        // FIXME: We are doing way to many double/triple exception checks for the overloaded functions"
        public abstract class Array : ICloneable, ICollection, IList, IEnumerable
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                , IStructuralComparable, IStructuralEquatable
 #endif
        {
@@ -453,7 +453,7 @@ namespace System
                        return new SimpleEnumerator (this);
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                int IStructuralComparable.CompareTo (object other, IComparer comparer)
                {
                        if (other == null)
index 71963cdc8c3b4c9500020f3bc386337b3c0a4057..7f6679a991877536459192140c7d5555315d7ed8 100644 (file)
@@ -219,10 +219,6 @@ namespace System
 
                private static Stream Open (IntPtr handle, FileAccess access, int bufferSize)
                {
-#if MOONLIGHT
-                       if (SecurityManager.SecurityEnabled && !Debugger.IsAttached && Environment.GetEnvironmentVariable ("MOONLIGHT_ENABLE_CONSOLE") == null)
-                               return new NullStream ();
-#endif
                        try {
                                return new FileStream (handle, access, false, bufferSize, false, bufferSize == 0);
                        } catch (IOException) {
index b4906122acde9444d8308ccde30a342471d48058..9593d24a2df8559ff69a3b88d3a5c2f44e5f96de 100644 (file)
@@ -36,9 +36,6 @@ namespace System
        /// <summary>
        ///   The ContextStatic attribute is used to flag fields as being unique
        /// </summary>
-#if MOONLIGHT
-       [Obsolete ("Not supported by the Silverlight runtime", true)]
-#endif
        [AttributeUsage (AttributeTargets.Field, Inherited=false)]
        [Serializable]
        [ComVisible (true)]
index 789ad5de6d8be4649fe39af889d40d1843ccb229..6d1c209a6c9e8a0daeaccabd4eb1bcd85ddaa94b 100644 (file)
@@ -621,7 +621,7 @@ namespace System
                        return true;
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public static bool TryParse<TEnum> (string value, out TEnum result) where TEnum : struct
                {
                        return TryParse (value, false, out result);
@@ -1014,7 +1014,7 @@ namespace System
                        }
                        return retVal;
                }
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public bool HasFlag (Enum flag)
                {
                        var val = get_value ();
index fe079897a97868dff9c52291f25dbd8f661c7f73..01b37e9848ecb542662b53116e0ef0eb653ec843 100644 (file)
@@ -85,7 +85,7 @@ namespace System {
                        ProgramFiles = 0x26,
                        MyPictures = 0x27,
                        CommonProgramFiles = 0x2b,
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        MyVideos = 0x0e,
 #endif
 #if NET_4_0
@@ -628,7 +628,7 @@ namespace System {
                        
                        case SpecialFolder.Templates:
                                return ReadXdgUserDir (config, home, "XDG_TEMPLATES_DIR", "Templates");
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        case SpecialFolder.MyVideos:
                                return ReadXdgUserDir (config, home, "XDG_VIDEOS_DIR", "Videos");
 #endif
@@ -836,7 +836,7 @@ namespace System {
                        throw new NotImplementedException ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                [SecurityCritical]
                public static void FailFast (string message, Exception exception)
                {
index ec1529e082ee4907281fb85a29652385c57d596d..3fe5505009955166031aa44efbd77e14073adfa4 100644 (file)
@@ -304,11 +304,7 @@ namespace System
                        info.AddValue ("RemoteStackTraceString", _remoteStackTraceString);
                        info.AddValue ("RemoteStackIndex", remote_stack_index);
                        info.AddValue ("HResult", hresult);
-#if !MOONLIGHT
                        info.AddValue ("Source", Source);
-#else
-                       info.AddValue ("Source", null);
-#endif
                        info.AddValue ("ExceptionMethod", null);
                        info.AddValue ("Data", _data, typeof (IDictionary));
                }
index 980d85155a0842a445c14052eee90b9231775711..f23140d959434c639ca6971946231c9a44f07fc1 100644 (file)
@@ -35,7 +35,7 @@ using System.Runtime.InteropServices;
 
 namespace System
 {
-#if NET_4_0 || MOONLIGHT
+#if NET_4_0
        [Obsolete]
 #endif
        [Serializable]
index d384e8855fbda71dc45b0282a5f0f7da07ecad18..3ef4bb6134a42150079a9fde2fa4596180d828b8 100644 (file)
@@ -72,21 +72,5 @@ namespace System {
 #else
        // Used internally
        delegate TResult Func<T1, T2, T3, TResult> (T1 arg1, T2 arg2, T3 arg3);
-#if MOONLIGHT
-       public delegate TResult Func<T1, T2, T3, T4, TResult> (
-               T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-
-       public delegate TResult Func<T1, T2, T3, T4, T5, TResult> (
-               T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
-
-       public delegate TResult Func<T1, T2, T3, T4, T5, T6, TResult> (
-               T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
-
-       public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, TResult> (
-               T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
-
-       public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> (
-               T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
-#endif
 #endif
 }
index 4c56588a7946fd5016c6123376468ea2468cfc35..1d9122e1a6251fd7f3b191c5eda3987b7c114c86 100644 (file)
@@ -145,7 +145,7 @@ namespace System
                }
 #endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal extern static void register_ephemeron_array (Ephemeron[] array);
 
index 7a235f9da6fae79d0db52beea62918fd39eae3d4..5801ffc6c0f51dc0a1200bd4e7e191eb904c7883 100644 (file)
@@ -699,7 +699,7 @@ namespace System {
                        return !( a.Equals (b) );
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public static Guid Parse (string input)
                {
                        if (input == null)
@@ -767,7 +767,7 @@ namespace System {
                        case 'P':
                        case 'p':
                                return Format.P;
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        case 'X':
                        case 'x':
                                return Format.X;
@@ -775,7 +775,7 @@ namespace System {
                        }
 
                        throw new FormatException (
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                                "Format String can be only one of \"D\", \"d\", \"N\", \"n\", \"P\", \"p\", \"B\", \"b\", \"X\" or \"x\""
 #else
                                "Format String can be only one of \"D\", \"d\", \"N\", \"n\", \"P\", \"p\", \"B\" or \"b\""
index f2f7e79a8e23ecffeb9de369aac524eb03fb68f7..0f019b9916edf4c90b3bce42f299c9c723ebd3c0 100644 (file)
@@ -24,7 +24,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System.Runtime.CompilerServices;
 
index a98b7d95a6c60da53136c9d9b9ea07b6080aaf7a..5449d87ab0932ed7716bd82ae6f0d4645048364e 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Runtime.Serialization;
index 55e6c9118d413e7018146034fb53c1209151b309..754ad34f834c246d5db69a8a794af7ab16dee120 100644 (file)
@@ -33,9 +33,6 @@ using System.Runtime.InteropServices;
 
 namespace System
 {
-#if MOONLIGHT
-       [Obsolete ("STAThreadAttribute is not supported in this release. It has been left in so that legacy tools can be used with this release, but it cannot be used in your code.", true)]
-#endif
        [AttributeUsage (AttributeTargets.Method)]
        [ComVisible (true)]
        public sealed class STAThreadAttribute : Attribute
index fb595c643b2cfb57d40564f9e698aca689b0c24c..1fe0743c0da38fc12d2e8bf9d99c8132eb97fbf8 100644 (file)
@@ -312,7 +312,7 @@ namespace System
                }
 
                // .NET 2.0 compatibility only
-#if !NET_4_0 && !MOONLIGHT && !MOBILE
+#if !NET_4_0 && !MOBILE
                static readonly char[] WhiteChars = {
                        (char) 0x9, (char) 0xA, (char) 0xB, (char) 0xC, (char) 0xD,
                        (char) 0x85, (char) 0x1680, (char) 0x2028, (char) 0x2029,
@@ -324,7 +324,7 @@ namespace System
 
                unsafe string[] SplitByCharacters (char[] sep, int count, bool removeEmpty)
                {
-#if !NET_4_0 && !MOONLIGHT && !MOBILE
+#if !NET_4_0 && !MOBILE
                        if (sep == null || sep.Length == 0)
                                sep = WhiteChars;
 #endif
@@ -1511,7 +1511,6 @@ namespace System
                        return (value == null) || (value.Length == 0);
                }
 
-#if !MOONLIGHT
                public string Normalize ()
                {
                        return Normalization.Normalize (this, 0);
@@ -1549,7 +1548,6 @@ namespace System
                                return Normalization.IsNormalized (this, 3);
                        }
                }
-#endif
 
                public string Remove (int startIndex)
                {
@@ -2335,7 +2333,7 @@ namespace System
                        return InternalIsInterned (str);
                }
        
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public static string Join (string separator, params string [] value)
 #else
                public static string Join (string separator, string [] value)
@@ -2643,7 +2641,7 @@ namespace System
                        }
                }
 
-#if MOONLIGHT || MOBILE || NET_4_0
+#if MOBILE || NET_4_0
                [ComVisible(false)]
                public static string Concat (IEnumerable<string> values)
                {
index 25918db80e5a24a8c2f9a7180e228b91ea965793..6f322d0f868614ebe9f3419d49ff5b9f4ad2d680 100644 (file)
@@ -39,7 +39,7 @@ namespace System
        [Serializable]
        [System.Runtime.InteropServices.ComVisible (true)]
        public struct TimeSpan : IComparable, IComparable<TimeSpan>, IEquatable <TimeSpan>
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                                 , IFormattable
 #endif
        {
@@ -359,7 +359,7 @@ namespace System
                        return p.Execute (true, out result);
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public static TimeSpan Parse (string input, IFormatProvider formatProvider)
                {
                        if (input == null)
@@ -526,7 +526,7 @@ namespace System
                        return sb.ToString ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                public string ToString (string format)
                {
                        return ToString (format, null);
@@ -719,7 +719,7 @@ namespace System
                        private int _cur = 0;
                        private int _length;
                        ParseError parse_error;
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        bool parsed_ticks;
                        NumberFormatInfo number_format;
                        int parsed_numbers_count;
@@ -735,12 +735,12 @@ namespace System
                        {
                                _src = src;
                                _length = _src.Length;
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                                number_format = GetNumberFormatInfo (null);
 #endif
                        }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        // Reset state data, so we can execute another parse over the input.
                        void Reset ()
                        {
@@ -806,7 +806,7 @@ namespace System
                                return res;
                        }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        // Used for custom formats parsing, where we may need to declare how
                        // many digits we expect, as well as the maximum allowed.
                        private int ParseIntExact (int digit_count, int max_digit_count)
@@ -855,7 +855,7 @@ namespace System
 
                                if (!optional && (count == 0))
                                        SetParseError (ParseError.Format);
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                                if (count > 0)
                                        parsed_numbers_count++;
 #endif
@@ -863,7 +863,7 @@ namespace System
                                return (int)res;
                        }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        // This behaves pretty much like ParseOptDot, but we need to have it
                        // as a separated routine for both days and decimal separators.
                        private bool ParseOptDaysSeparator ()
@@ -962,7 +962,7 @@ namespace System
 
                                if (!digitseen)
                                        SetParseError (ParseError.Format);
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                                else if (!AtEnd && Char.IsDigit (_src, _cur))
                                        SetParseError (ParseError.Overflow);
 
@@ -972,7 +972,7 @@ namespace System
                                return res;
                        }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        // Used by custom formats parsing
                        // digits_count = 0 for digits up to max_digits_count (optional), and other value to
                        // force a precise number of digits.
@@ -1006,7 +1006,7 @@ namespace System
                                parse_error = error;
                        }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        bool CheckParseSuccess (bool tryParse)
 #else
                        bool CheckParseSuccess (int hours, int minutes, int seconds, bool tryParse)
@@ -1014,7 +1014,7 @@ namespace System
                        {
                                // We always report the first error, but for 2.0 we need to give a higher
                                // precence to per-element overflow (as opposed to int32 overflow).
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                                if (parse_error == ParseError.Overflow) {
 #else
                                if (parse_error == ParseError.Overflow || hours > 23 || minutes > 59 || seconds > 59) {
@@ -1035,7 +1035,7 @@ namespace System
                                return true;
                        }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        // We are using a different parse approach in 4.0, due to some changes in the behaviour
                        // of the parse routines.
                        // The input string is documented as:
@@ -1219,7 +1219,7 @@ namespace System
                        }
 #endif
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                        public bool ExecuteWithFormat (string format, TimeSpanStyles style, bool tryParse, out TimeSpan result)
                        {
                                int days, hours, minutes, seconds;
@@ -1326,7 +1326,7 @@ namespace System
                        }
 #endif
                }
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
                enum FormatElementType 
                {
                        Days,
index fe8660e27e264745708a6e9955e5889d4f0c6fab..e01f915faec3e6e20ddb4c0f050879a29d5f9679 100644 (file)
@@ -24,7 +24,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System.Runtime.CompilerServices;
 
index ad07696f7ca93f7c3882306b7082042e2c83cf9a..e89175f73d1e867614fa39bb68a96fa44924d415 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if MOONLIGHT || NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 
index 6256a029ebb13006cb8507cca724a4577f752d1a..93c9999f5e73cb3fb1907bebd587fc36fe68a496 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if MOONLIGHT || NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Collections;
index 58df33a0538addfcd2dd4154c5c829ff14d503b8..2e2752e63e3f87594d514ddf6dde86717cd317cc 100644 (file)
@@ -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_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
 
index 9138e8db2915d1457d05692866f742f6e08a3096..036be2fe412cd24b1fda3e6e8d2812888d93914e 100644 (file)
@@ -306,7 +306,7 @@ namespace System {
                        return v1.CompareTo (v2) <= 0;
                }
 
-#if BOOSTRAP_NET_4_0 || NET_4_0 || MOONLIGHT || MOBILE
+#if BOOSTRAP_NET_4_0 || NET_4_0 || MOBILE
                public static Version Parse (string input)
                {
                        // Exactly the same as calling Version(string) .ctor
index de5103a639a4280d37a955c9435e8feb4e252013..7bf3ed2109d085db1759c67ae82ed7295722f518 100644 (file)
@@ -46,13 +46,10 @@ namespace System
        [Guid ("05F696DC-2B29-3663-AD8B-C4389CF2A713")]
        public interface _AppDomain
        {
-#if !MOONLIGHT
                string BaseDirectory {get; }
                string DynamicDirectory {get; }
                Evidence Evidence {get; }
-#endif
                string FriendlyName {get; }
-#if !MOONLIGHT
                string RelativeSearchPath {get; }
                bool ShadowCopyFiles {get; }
 
@@ -64,9 +61,7 @@ namespace System
 
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
                void ClearShadowCopyPath ();
-#endif
 
-#if !MOONLIGHT
                ObjectHandle CreateInstance (string assemblyName, string typeName);
                ObjectHandle CreateInstance (string assemblyName, string typeName, object[] activationAttributes);
                ObjectHandle CreateInstance (string assemblyName, string typeName, bool ignoreCase,
@@ -78,7 +73,6 @@ namespace System
                ObjectHandle CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase,
                        BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture,
                        object[] activationAttributes, Evidence securityAttributes);
-#endif
 
 #if !FULL_AOT_RUNTIME
                AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access);
@@ -114,16 +108,12 @@ namespace System
 #if !NET_4_0
                [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
 #endif
-#if !MOONLIGHT
                object GetLifetimeService ();
-#endif
 
                Type GetType ();
 
-#if !MOONLIGHT
                [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
                object InitializeLifetimeService ();
-#endif
 
                Assembly Load (AssemblyName assemblyRef);
                Assembly Load (byte[] rawAssembly);
@@ -133,25 +123,21 @@ namespace System
                Assembly Load (string assemblyString, Evidence assemblySecurity);
                Assembly Load (byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence);
 
-#if !MOONLIGHT
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
                void SetAppDomainPolicy (PolicyLevel domainPolicy);
 
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
                void SetCachePath (string s);
-#endif
 
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
                void SetData (string name, object data);
 
-#if !MOONLIGHT
                void SetPrincipalPolicy (PrincipalPolicy policy);
 
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
                void SetShadowCopyPath (string s);
 
                void SetThreadPrincipal (IPrincipal principal);
-#endif
 
                string ToString ();
 
index e314786fa4c9a71468d269c0ca1ccd50c01a4778..1897640d7f5bff8c6304b553be6f7164455a242a 100644 (file)
@@ -535,7 +535,7 @@ namespace MonoTests.System.Text {
        }
 
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
        [Test]
        public void ClearMethod () {
                StringBuilder sb = new StringBuilder ("Text");