2008-09-24 Jb Evain <jbevain@novell.com>
authorJb Evain <jbevain@gmail.com>
Wed, 24 Sep 2008 14:01:36 +0000 (14:01 -0000)
committerJb Evain <jbevain@gmail.com>
Wed, 24 Sep 2008 14:01:36 +0000 (14:01 -0000)
* AppDomain.cs: implement the CreateDomain overload which
takes an AppDomain initializer. Fixes #429545.

svn path=/trunk/mcs/; revision=113960

mcs/class/corlib/System/AppDomain.cs
mcs/class/corlib/System/ChangeLog

index 6532592419ebe2ac04cac905d9ff965a8778687a..c024862c93da86090a25d324ecb1521ce0b0c3a7 100644 (file)
@@ -859,17 +859,7 @@ namespace System {
                public static AppDomain CreateDomain (string friendlyName, Evidence securityInfo,string appBasePath,
                                                      string appRelativeSearchPath, bool shadowCopyFiles)
                {
-                       AppDomainSetup info = new AppDomainSetup ();
-
-                       info.ApplicationBase = appBasePath;
-                       info.PrivateBinPath = appRelativeSearchPath;
-
-                       if (shadowCopyFiles)
-                               info.ShadowCopyFiles = "true";
-                       else
-                               info.ShadowCopyFiles = "false";
-
-                       return CreateDomain (friendlyName, securityInfo, info);
+                       return CreateDomain (friendlyName, securityInfo, appBasePath, appRelativeSearchPath, shadowCopyFiles, null, null);
                }
 
 #if NET_2_0
@@ -1193,11 +1183,23 @@ namespace System {
 
                // static methods
 
-               [MonoTODO ("add support for new delegate")]
                public static AppDomain CreateDomain (string friendlyName, Evidence securityInfo, string appBasePath,
                        string appRelativeSearchPath, bool shadowCopyFiles, AppDomainInitializer adInit, string[] adInitArgs)
                {
-                       return CreateDomain (friendlyName, securityInfo, appBasePath, appRelativeSearchPath, shadowCopyFiles);
+                       AppDomainSetup info = new AppDomainSetup ();
+
+                       info.ApplicationBase = appBasePath;
+                       info.PrivateBinPath = appRelativeSearchPath;
+
+                       if (shadowCopyFiles)
+                               info.ShadowCopyFiles = "true";
+                       else
+                               info.ShadowCopyFiles = "false";
+
+                       info.AppDomainInitializerArguments = adInitArgs;
+                       info.AppDomainInitializer = adInit;
+
+                       return CreateDomain (friendlyName, securityInfo, info);
                }
 
                public int ExecuteAssemblyByName (string assemblyName)
index 7e60470b38bead7f1adfc2843d43ab5b4f81f632..69dea0a8f7dcef1ffc258da74721dce0ddd7e554 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-24  Jb Evain  <jbevain@novell.com>
+
+       * AppDomain.cs: implement the CreateDomain overload which
+       takes an AppDomain initializer. Fixes #429545.
+
 2008-09-17  Robert Jordan  <robertj@gmx.net>
 
        * DelegateSerializationHolder.cs: Starting with .NET 2.0, delegates