Author: andrews
Date: 2006-06-28 06:21:12 -0400 (Wed, 28 Jun 2006)
New Revision: 62108

Modified:
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
Log:
#if TARGET_JVM

Modified: trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs       
2006-06-28 08:16:14 UTC (rev 62107)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs       
2006-06-28 10:21:12 UTC (rev 62108)
@@ -59,9 +59,12 @@
                {
                        if (host == null)
                                return;
+#if !TARGET_JVM
                        AppDomain.Unload (Host.AppDomain);
                        AppDomain.CurrentDomain.SetData (HOST_INSTANCE_NAME, 
null);
+#endif
                        host = null;
+                       Directory.Delete (baseDir, true);
                }
 
                public WebTest ()
@@ -88,6 +91,8 @@
                        Request = request;
                }
 
+
+#if !TARGET_JVM
                static void LoadAssemblyRecursive (Assembly ass)
                {
                        if (ass.GlobalAssemblyCache)
@@ -119,6 +124,7 @@
                                return;
                        File.Copy (oldfn, newfn);
                }
+#endif
 
                private static void EnsureDirectoryExists (string directory)
                {
@@ -172,6 +178,7 @@
                        baseDir = tmpFile;
                        binDir = Directory.CreateDirectory (Path.Combine 
(baseDir, "bin")).FullName;
 
+#if !TARGET_JVM
                        foreach (Assembly ass in 
AppDomain.CurrentDomain.GetAssemblies ())
                                LoadAssemblyRecursive (ass);
 
@@ -179,6 +186,9 @@
                                CopyAssembly (ass, binDir);
 
                        MyHost host = (MyHost) 
ApplicationHost.CreateApplicationHost (typeof (MyHost), VIRTUAL_BASE_DIR, 
baseDir);
+#else
+                       host = new MyHost ();
+#endif
                        AppDomain.CurrentDomain.SetData (HOST_INSTANCE_NAME, 
host);
                        host.AppDomain.SetData (HOST_INSTANCE_NAME, host);
                        return host;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to