Author: gonzalo
Date: 2005-05-08 21:00:49 -0400 (Sun, 08 May 2005)
New Revision: 44231

Modified:
   trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI/Page.cs
Log:
2005-05-08 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * Page.cs: as setting CurrentCulture is slow, don't set it if the
        culture has not changed since before the page started processing.



Modified: trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/ChangeLog  2005-05-08 23:57:58 UTC 
(rev 44230)
+++ trunk/mcs/class/System.Web/System.Web.UI/ChangeLog  2005-05-09 01:00:49 UTC 
(rev 44231)
@@ -1,3 +1,8 @@
+2005-05-08 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * Page.cs: as setting CurrentCulture is slow, don't set it if the
+       culture has not changed since before the page started processing.
+
 2005-05-06 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * TemplateParser.cs: LoadWithPartialName returns null if the assembly is

Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2005-05-08 23:57:58 UTC 
(rev 44230)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2005-05-09 01:00:49 UTC 
(rev 44231)
@@ -829,8 +829,11 @@
                        try {
                                UnloadRecursive (true);
                        } catch {}
-                       Thread.CurrentThread.CurrentCulture = culture;
-                       Thread.CurrentThread.CurrentUICulture = uiculture;
+                       if (Thread.CurrentThread.CurrentCulture.Equals 
(culture) == false)
+                               Thread.CurrentThread.CurrentCulture = culture;
+
+                       if (Thread.CurrentThread.CurrentUICulture.Equals 
(uiculture) == false)
+                               Thread.CurrentThread.CurrentUICulture = 
uiculture;
                }
        }
        

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

Reply via email to