[corlib] Remove multiple appdomain support (AppDomain.CreateDomain, etc) from tvOS...
[mono.git] / mcs / class / corlib / System / AppDomainSetup.cs
index c515ae1785cf0869f85dcfafcbd901db48c8a6d3..b3e2d510138af5bcc9b4fafc390304de7cd1a159 100644 (file)
@@ -297,6 +297,8 @@ namespace System
                        }
                }
 
+               public string TargetFrameworkName { get; set; }
+
                public ActivationArguments ActivationArguments {
                        get {
                                if (_activationArguments != null)
@@ -307,6 +309,7 @@ namespace System
                        set { _activationArguments = value; }
                }
 
+#if MONO_FEATURE_MULTIPLE_APPDOMAINS
                [MonoLimitation ("it needs to be invoked within the created domain")]
                public AppDomainInitializer AppDomainInitializer {
                        get {
@@ -317,6 +320,14 @@ namespace System
                        }
                        set { domain_initializer = value; }
                }
+#else
+               [Obsolete ("AppDomainSetup.AppDomainInitializer is not supported on this platform.", true)]
+               public AppDomainInitializer AppDomainInitializer {
+                       get { throw new PlatformNotSupportedException ("AppDomainSetup.AppDomainInitializer is not supported on this platform."); }
+                       set { throw new PlatformNotSupportedException ("AppDomainSetup.AppDomainInitializer is not supported on this platform."); }
+               }
+#endif // MONO_FEATURE_MULTIPLE_APPDOMAINS
+
 
                [MonoLimitation ("it needs to be used to invoke the initializer within the created domain")]
                public string [] AppDomainInitializerArguments {
@@ -367,7 +378,9 @@ namespace System
                                object [] arr = (object []) bf.Deserialize (ms);
 
                                _activationArguments = (ActivationArguments) arr [0];
+#if MONO_FEATURE_MULTIPLE_APPDOMAINS
                                domain_initializer = (AppDomainInitializer) arr [1];
+#endif
                                application_trust = (ApplicationTrust) arr [2];
 
                                serialized_non_primitives = null;
@@ -390,11 +403,9 @@ namespace System
                        serialized_non_primitives = ms.ToArray ();
                }
 
-#if NET_4_0
                [MonoTODO ("not implemented, does not throw because it's used in testing moonlight")]
                public void SetCompatibilitySwitches (IEnumerable<string> switches)
                {
                }
-#endif
        }
 }