Author: kostat
Date: 2007-03-27 12:41:29 -0500 (Tue, 27 Mar 2007)
New Revision: 75035

Modified:
   trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
Log:
prepare for resource assembly resolution per AppDomain

Modified: trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs    2007-03-27 
17:29:13 UTC (rev 75034)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs    2007-03-27 
17:41:29 UTC (rev 75035)
@@ -44,20 +44,7 @@
                private static readonly object LOCK_GETASSEMBLIESCACHEDDOCUMENT 
= new object();
                private static readonly object LOCK_GETFROMMAPPATHCACHE = new 
object();
 
-               static PageMapper ()
-               {
-                       AppDomain.CurrentDomain.AssemblyResolve += new 
ResolveEventHandler (CurrentDomain_AssemblyResolve);
-                       try
-                       {
-                               //Try to load the  global resources
-                               HttpContext.AppGlobalResourcesAssembly = 
GetCachedAssembly ("app_globalresources");
-                       }
-                       catch
-                       {
-                       }
-               }
 
-
                static Assembly CurrentDomain_AssemblyResolve (object sender, 
ResolveEventArgs args)
                {
                        Assembly resolvedAssembly = null;
@@ -91,6 +78,15 @@
                                        }
                                        
AppDomain.CurrentDomain.SetData(J2EEConsts.MAP_PATH_CACHE,answer);
 
+                                       AppDomain.CurrentDomain.AssemblyResolve 
+= new ResolveEventHandler (CurrentDomain_AssemblyResolve);
+                                       try
+                                       {
+                                               //Try to load the  global 
resources
+                                               
HttpContext.AppGlobalResourcesAssembly = GetCachedAssembly 
("app_globalresources");
+                                       }
+                                       catch
+                                       {
+                                       }
                                }
                        }
                        return (string)answer[key];

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

Reply via email to