Author: roeie
Date: 2007-03-07 12:00:13 -0500 (Wed, 07 Mar 2007)
New Revision: 73894
Modified:
trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
Log:
Global resources fix
Modified: trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs 2007-03-07
16:52:04 UTC (rev 73893)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs 2007-03-07
17:00:13 UTC (rev 73894)
@@ -44,6 +44,34 @@
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;
+ try
+ {
+ resolvedAssembly = GetCachedAssembly
(args.Name);
+ }
+ catch
+ {
+ resolvedAssembly = null;
+ }
+
+ return resolvedAssembly;
+ }
public static string GetFromMapPathCache(string key)
{
Hashtable answer = null;
@@ -241,6 +269,7 @@
//spivak.December 07 2006
public MetaProvider GetMetaByURL(string url)
{
+
#if !NO_GLOBAL_LOCK_ON_COMPILE
string lwUrl = url.ToLower();
lock (_table)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches