Author: igorz
Date: 2008-01-27 07:24:31 -0500 (Sun, 27 Jan 2008)
New Revision: 94044

Modified:
   trunk/mcs/class/System.Web/System.Web.UI/MasterPage.cs
   trunk/mcs/class/System.Web/System.Web.UI/Page.cs
   trunk/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs
Log:
added TARGET_JVM ifdefs

Modified: trunk/mcs/class/System.Web/System.Web.UI/MasterPage.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/MasterPage.cs      2008-01-27 
12:05:06 UTC (rev 94043)
+++ trunk/mcs/class/System.Web/System.Web.UI/MasterPage.cs      2008-01-27 
12:24:31 UTC (rev 94044)
@@ -105,7 +105,13 @@
                internal static MasterPage CreateMasterPage (TemplateControl 
owner, HttpContext context,
                                                             string 
masterPageFile, IDictionary contentTemplateCollection)
                {
+#if TARGET_JVM
+                       MasterPage masterPage = 
MasterPageParser.GetCompiledMasterInstance (masterPageFile,
+                                                                               
            owner.Page.MapPath (masterPageFile),
+                                                                               
            context);
+#else
                        MasterPage masterPage = 
BuildManager.CreateInstanceFromVirtualPath (masterPageFile, typeof 
(MasterPage)) as MasterPage;
+#endif
                        if (masterPage == null)
                                throw new HttpException ("Failed to create 
MasterPage instance for '" + masterPageFile + "'.");
                        

Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2008-01-27 12:05:06 UTC 
(rev 94043)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2008-01-27 12:24:31 UTC 
(rev 94044)
@@ -612,11 +612,15 @@
                        if (ps != null)
                                _styleSheetTheme = ps.StyleSheetTheme;
                }
+#if TARGET_JVM
+               if (_styleSheetTheme != null && _styleSheetTheme != "")
+                       _styleSheetPageTheme = 
ThemeDirectoryCompiler.GetCompiledInstance (_styleSheetTheme, Context);
+#else
                if (!String.IsNullOrEmpty (_styleSheetTheme)) {
                        string virtualPath = "~/App_Themes/" + _styleSheetTheme;
                        _styleSheetPageTheme = 
BuildManager.CreateInstanceFromVirtualPath (virtualPath, typeof (PageTheme)) as 
PageTheme;
                }
-               
+#endif 
        }
 
        void InitializeTheme ()
@@ -626,12 +630,19 @@
                        if (ps != null)
                                _theme = ps.Theme;
                }
+#if TARGET_JVM
+               if (_theme != null && _theme != "") {
+                       _pageTheme = ThemeDirectoryCompiler.GetCompiledInstance 
(_theme, Context);
+                       _pageTheme.SetPage (this);
+               }
+#else
                if (!String.IsNullOrEmpty (_theme)) {
                        string virtualPath = "~/App_Themes/" + _theme;
                        _pageTheme = BuildManager.CreateInstanceFromVirtualPath 
(virtualPath, typeof (PageTheme)) as PageTheme;
                        if (_pageTheme != null)
                                _pageTheme.SetPage (this);
                }
+#endif 
        }
 
 #endif

Modified: trunk/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs      
2008-01-27 12:05:06 UTC (rev 94043)
+++ trunk/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs      
2008-01-27 12:24:31 UTC (rev 94044)
@@ -37,7 +37,7 @@
        {
                public virtual IHttpHandler GetHandler (HttpContext context, 
string requestType, string url, string path)
                {
-#if NET_2_0
+#if NET_2_0 && !TARGET_JVM
                        return BuildManager.CreateInstanceFromVirtualPath (url, 
typeof (IHttpHandler)) as IHttpHandler;
 #else
                        return PageParser.GetCompiledPageInstance (url, path, 
context);

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

Reply via email to