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
{
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
[MonoTODO ("No COM support")]
public static ObjectHandle CreateComInstanceFrom (string assemblyName, string typeName)
{
}
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);
}
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
[SecurityPermission (SecurityAction.LinkDemand, RemotingConfiguration = true)]
public static object GetObject (Type type, string url)
{
[ThreadStatic]
static Hashtable assembly_resolve_in_progress_refonly;
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
// CAS
private Evidence _evidence;
private PermissionSet _granted;
get { throw new NotImplementedException (); }
}
#endif
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
public string BaseDirectory {
get {
string path = SetupInformationNoCopy.ApplicationBase;
return getFriendlyName ();
}
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
public Evidence Evidence {
get {
// if the host (runtime) hasn't provided it's own evidence...
}
}
-#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)]
assembly.FromByteArray = true;
return assembly;
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
#if NET_4_0
[Obsolete ("AppDomain policy levels are obsolete")]
#endif
return _process_guid;
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
public static AppDomain CreateDomain (string friendlyName)
{
public override string ToString ()
{
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
return getFriendlyName ();
#else
StringBuilder sb = new StringBuilder ("Name:");
get { return _domain_manager; }
}
-#if (!NET_2_1 || MONOTOUCH)
+#if (!MOONLIGHT)
public event ResolveEventHandler ReflectionOnlyAssemblyResolve;
}
#endif
-#if NET_2_1 && !MONOTOUCH
+#if MOONLIGHT
public int ExecuteAssemblyByName (string assemblyName)
{
// critical code in SL that we're not calling in ML
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
bool disallow_binding_redirects;
bool disallow_code_downloads;
-#if (!NET_2_1 || MONOTOUCH)
+#if (!MOONLIGHT)
private ActivationArguments _activationArguments;
AppDomainInitializer domain_initializer;
[NonSerialized]
configuration_bytes = setup.configuration_bytes;
}
-#if (!NET_2_1 || MONOTOUCH)
+#if (!MOONLIGHT)
public AppDomainSetup (ActivationArguments activationArguments)
{
_activationArguments = activationArguments;
application_name = value;
}
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
public string CachePath {
get {
return cache_path;
loader_optimization = value;
}
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
public string PrivateBinPath {
get {
return private_bin_path;
+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.
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
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);
return (value == null) || (value.Length == 0);
}
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
public string Normalize ()
{
return Normalization.Normalize (this, 0);
// 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;
// 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;