use MOONLIGHT symbol
authorJb Evain <jbevain@gmail.com>
Tue, 16 Mar 2010 12:27:35 +0000 (12:27 -0000)
committerJb Evain <jbevain@gmail.com>
Tue, 16 Mar 2010 12:27:35 +0000 (12:27 -0000)
svn path=/trunk/mcs/; revision=153672

mcs/class/corlib/System/Activator.cs
mcs/class/corlib/System/AppDomain.cs
mcs/class/corlib/System/AppDomainSetup.cs
mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Console.cs
mcs/class/corlib/System/Exception.cs
mcs/class/corlib/System/String.cs
mcs/class/corlib/System/Tuple.cs
mcs/class/corlib/System/Tuples.cs

index 06ea67fd6542572017bcd563efd8faaf124f75e6..245f28e39d066a7e21b2b0e40aea4121307cb10d 100644 (file)
@@ -37,7 +37,7 @@ using System.Security.Permissions;
 using System.Security.Policy;
 using System.Configuration.Assemblies;
 using System.Text;
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 using System.Runtime.Remoting;
 using System.Runtime.Remoting.Activation;
 #endif
@@ -58,7 +58,7 @@ namespace System
                {
                }
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                [MonoTODO ("No COM support")]
                public static ObjectHandle CreateComInstanceFrom (string assemblyName, string typeName)
                {
@@ -286,7 +286,7 @@ namespace System
                        }
 
                        CheckAbstractType (type);
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                        if (activationAttributes != null && activationAttributes.Length > 0) {
                                if (!type.IsMarshalByRef) {
                                        string msg = Locale.GetText ("Type '{0}' doesn't derive from MarshalByRefObject.", type.FullName);
@@ -357,7 +357,7 @@ namespace System
                        }
                }
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                [SecurityPermission (SecurityAction.LinkDemand, RemotingConfiguration = true)]
                public static object GetObject (Type type, string url)
                {
index f39daef611b5289cb9717f9777eaaf12c1ff9ac5..83ded478d32001ae9b773864ffd0af744b296b3b 100644 (file)
@@ -81,7 +81,7 @@ namespace System {
 
                [ThreadStatic]
                static Hashtable assembly_resolve_in_progress_refonly;
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                // CAS
                private Evidence _evidence;
                private PermissionSet _granted;
@@ -121,7 +121,7 @@ namespace System {
                        get { throw new NotImplementedException (); }
                }
 #endif
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                public string BaseDirectory {
                        get {
                                string path = SetupInformationNoCopy.ApplicationBase;
@@ -174,7 +174,7 @@ namespace System {
                                return getFriendlyName ();
                        }
                }
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                public Evidence Evidence {
                        get {
                                // if the host (runtime) hasn't provided it's own evidence...
@@ -248,7 +248,7 @@ namespace System {
                        }
                }
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 
                [Obsolete ("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")]
                [SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
@@ -793,7 +793,7 @@ namespace System {
                        assembly.FromByteArray = true;
                        return assembly;
                }
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 #if NET_4_0
                [Obsolete ("AppDomain policy levels are obsolete")]
 #endif
@@ -945,7 +945,7 @@ namespace System {
                        return _process_guid;
                }
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 
                public static AppDomain CreateDomain (string friendlyName)
                {
@@ -1155,7 +1155,7 @@ namespace System {
 
                public override string ToString ()
                {
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                        return getFriendlyName ();
 #else
                        StringBuilder sb = new StringBuilder ("Name:");
@@ -1369,7 +1369,7 @@ namespace System {
                        get { return _domain_manager; }
                }
 
-#if (!NET_2_1 || MONOTOUCH)
+#if (!MOONLIGHT)
 
                public event ResolveEventHandler ReflectionOnlyAssemblyResolve;
 
@@ -1479,7 +1479,7 @@ namespace System {
                }
 #endif
 
-#if NET_2_1 && !MONOTOUCH
+#if MOONLIGHT
                public int ExecuteAssemblyByName (string assemblyName)
                {
                        // critical code in SL that we're not calling in ML
index 45f2d81395e71911727671248a0e6dc022a6f5a2..d6d569d1c5efd2dcf6b209ba70cd5e2f9f1dea7e 100644 (file)
@@ -37,7 +37,7 @@ using System.Runtime.InteropServices;
 using System.Security;
 using System.Runtime.Serialization.Formatters.Binary;
 
-#if(!NET_2_1 || MONOTOUCH)
+#if(!MOONLIGHT)
 using System.Runtime.Hosting;
 using System.Security.Policy;
 #endif
@@ -69,7 +69,7 @@ namespace System
                bool disallow_binding_redirects;
                bool disallow_code_downloads;
 
-#if (!NET_2_1 || MONOTOUCH)
+#if (!MOONLIGHT)
                private ActivationArguments _activationArguments;
                AppDomainInitializer domain_initializer;
                [NonSerialized]
@@ -116,7 +116,7 @@ namespace System
                        configuration_bytes = setup.configuration_bytes;
                }
 
-#if (!NET_2_1 || MONOTOUCH)
+#if (!MOONLIGHT)
                public AppDomainSetup (ActivationArguments activationArguments)
                {
                        _activationArguments = activationArguments;
@@ -162,7 +162,7 @@ namespace System
                                application_name = value;
                        }
                }
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                public string CachePath {
                        get {
                                return cache_path;
@@ -235,7 +235,7 @@ namespace System
                                loader_optimization = value;
                        }
                }
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                public string PrivateBinPath {
                        get {
                                return private_bin_path;
index 59661c6e039bab991fcb6f64259d5e3f4937ec78..00d31c286678499343a79c7d3e128a9587b83739 100644 (file)
@@ -1,3 +1,16 @@
+2010-03-16  Jb Evain  <jbevain@novell.com>
+
+       * AppDomainSetup.cs
+       * Tuple.cs
+       * ChangeLog
+       * Exception.cs
+       * String.cs
+       * Console.cs
+       * Tuples.cs
+       * Activator.cs
+       * AppDomain.cs:
+               Use MOONLIGHT symbol to disambiguate MonoTouch and Moonlight code.
+
 2010-03-16  Rolf Bjarne Kvinge  <RKvinge@novell.com>
 
        * Enum.cs: Added a few 4.0 api to Moonlight.
index c2d78fd01b346c95138834a5686901bb98717cab..ea9365e689fae20a2f144e5a859ac854217e1d35 100644 (file)
@@ -152,7 +152,7 @@ namespace System
 
                private static Stream Open (IntPtr handle, FileAccess access, int bufferSize)
                {
-#if NET_2_1 && !MONOTOUCH
+#if MOONLIGHT
                        if (SecurityManager.SecurityEnabled && !Debugger.IsAttached && Environment.GetEnvironmentVariable ("MOONLIGHT_ENABLE_CONSOLE") == null)
                                return new NullStream ();
 #endif
index 0f0ea62ce9c905abe5245f7c37083d5eba61744c..b4a2f1ee665cf1c2faf13efd5797fdaf1548e158 100644 (file)
@@ -262,7 +262,7 @@ namespace System
                        info.AddValue ("RemoteStackTraceString", _remoteStackTraceString);
                        info.AddValue ("RemoteStackIndex", remote_stack_index);
                        info.AddValue ("HResult", hresult);
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                        info.AddValue ("Source", Source);
 #else
                        info.AddValue ("Source", null);
index ff0a8d96e2a019b4e0e0c1d80eae518c05ff5f75..931a89074ca81ddbd85a6b97352fa318d1718635 100644 (file)
@@ -1393,7 +1393,7 @@ namespace System
                        return (value == null) || (value.Length == 0);
                }
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
                public string Normalize ()
                {
                        return Normalization.Normalize (this, 0);
index 078669e1cafb3311df9090ff71e6dd84cd537818..081071787274f5ede65ec79f14fcbe181954b7ac 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if (NET_2_1 && !MONOTOUCH) || NET_4_0
+#if MOONLIGHT || NET_4_0
 
 using System;
 
index a00e5384082cb7c33f7f0b8a899b0a1b0361dc05..6404a923303e33b3104001b92a63f7cb2279e1ae 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if (NET_2_1 && !MONOTOUCH) || NET_4_0
+#if MOONLIGHT || NET_4_0
 
 using System;
 using System.Collections;