{
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExceptionHandler);
this.SetLevel(this.TraceSource.Switch.Level);
+#if MONO_FEATURE_MULTIPLE_APPDOMAINS
currentDomain.DomainUnload += new EventHandler(ExitOrUnloadEventHandler);
+#endif
currentDomain.ProcessExit += new EventHandler(ExitOrUnloadEventHandler);
}
}
#if FEATURE_COMINTEROP || MONO_COM || MOBILE_LEGACY
#if FEATURE_CLICKONCE || MOBILE_LEGACY
+#if FEATURE_CLICKONCE || MONO_FEATURE_MULTIPLE_APPDOMAINS
[System.Security.SecuritySafeCritical] // auto-generated
public static ObjectHandle CreateInstance (ActivationContext activationContext) {
AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager;
return domainManager.ApplicationActivator.CreateInstance(activationContext, activationCustomData);
}
+#else
+ [Obsolete ("Activator.CreateInstance (ActivationContext) is not supported on this platform.", true)]
+ public static ObjectHandle CreateInstance (ActivationContext activationContext) {
+ throw new PlatformNotSupportedException ("Activator.CreateInstance (ActivationContext) is not supported on this platform.");
+ }
+
+ [Obsolete ("Activator.CreateInstance (ActivationContext, string[]) is not supported on this platform.", true)]
+ public static ObjectHandle CreateInstance (ActivationContext activationContext, string[] activationCustomData) {
+ throw new PlatformNotSupportedException ("Activator.CreateInstance (ActivationContext) is not supported on this platform.");
+ }
+#endif
#endif // FEATURE_CLICKONCE
[ResourceExposure(ResourceScope.Machine)]
private static void EnsureADUnloadCallbackRegistered()
{
+#if MONO_FEATURE_MULTIPLE_APPDOMAINS
if (s_adUnloadEventHandler == null &&
Interlocked.CompareExchange( ref s_adUnloadEventHandler,
AppDomainUnloadCallback,
{
AppDomain.CurrentDomain.DomainUnload += s_adUnloadEventHandler;
}
+#endif
}
private static void AppDomainUnloadCallback(object sender, EventArgs e)