2007-10-29 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Mon, 29 Oct 2007 19:23:20 +0000 (19:23 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Mon, 29 Oct 2007 19:23:20 +0000 (19:23 -0000)
* TemplateParser.cs: add the file pointed to by the Src or
CodeFile attributes to the list of page cache dependencies.

* PageParser.cs, UserControlParser.cs: Add the MasterPage file to
the list of page cache dependencies.

* MasterPageParser.cs: add the source pointed to by VirtualPath to
the list of cache dependencies.

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

mcs/class/System.Web/System.Web.UI/ChangeLog
mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
mcs/class/System.Web/System.Web.UI/PageParser.cs
mcs/class/System.Web/System.Web.UI/TemplateParser.cs
mcs/class/System.Web/System.Web.UI/UserControlParser.cs

index ad5edade702c2565609ff48e02b88ff6b8bf6194..ee7b17660d5610a776fc896b7bc3f513e2f66b16 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-29  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateParser.cs: add the file pointed to by the Src or
+       CodeFile attributes to the list of page cache dependencies.
+
+       * PageParser.cs, UserControlParser.cs: Add the MasterPage file to
+       the list of page cache dependencies.
+
+       * MasterPageParser.cs: add the source pointed to by VirtualPath to
+       the list of cache dependencies.
+
 2007-10-23  Marek Habersack  <mhabersack@novell.com>
 
        * ClientScriptManager.cs: added two constants to define start/end
index 2cac8860aa9aaab2ed918744330d326c48a57078..8871f007e44a14adf60948f1ff2d17907898ddc1 100644 (file)
@@ -86,9 +86,12 @@ namespace System.Web.UI
                                                ThrowParseException ("Could not load type '" + type + "'.");
                                } else {
                                        string path = GetString (atts, "VirtualPath", null);
-                                       if (path != null)
-                                               masterType = MasterPageParser.GetCompiledMasterType (path, MapPath (path), HttpContext.Current);
-                                       else
+                                       if (path != null) {
+                                               string mappedPath = MapPath (path);
+                                               masterType = MasterPageParser.GetCompiledMasterType (path, mappedPath,
+                                                                                                    HttpContext.Current);
+                                               AddDependency (mappedPath);
+                                       } else
                                                ThrowParseException ("The MasterType directive must have either a TypeName or a VirtualPath attribute.");                               }
                                AddAssembly (masterType.Assembly, true);
                        }
index df2f3ef8e4a2906ceab432a3a62a63eeeb535115..fb629ecbe0a5451ecea658e1aa53b9fd5fb14d93 100644 (file)
@@ -349,9 +349,12 @@ namespace System.Web.UI
                        masterPage = GetString (atts, "MasterPageFile", masterPage);
                        
                        // Make sure the page exists
-                       if (!String.IsNullOrEmpty (masterPage))
-                               MasterPageParser.GetCompiledMasterType (masterPage, MapPath (masterPage), HttpContext.Current);
-
+                       if (!String.IsNullOrEmpty (masterPage)) {
+                               string path = MapPath (masterPage);
+                               MasterPageParser.GetCompiledMasterType (masterPage, path, HttpContext.Current);
+                               AddDependency (path);
+                       }
+                       
                        title = GetString(atts, "Title", null);
 
                        theme = GetString (atts, "Theme", theme);
index 92f25cf22429fe580a0e3a626361bc2cd26088ab..81042f875f1d4a7894cedc7d236ba43617a15ce6 100644 (file)
@@ -578,6 +578,9 @@ namespace System.Web.UI {
                        if (inherits != null)
                                SetBaseType (inherits);
 #endif
+                       if (src != null)
+                               AddDependency (MapPath (src, false));
+                       
                        className = GetString (atts, "ClassName", null);
                        if (className != null) {
 #if NET_2_0
index be3d572292b51af1db84ab2350bae521ce6c845e..43080f06d6b8683add3b5f46b8976ca24198e71f 100644 (file)
@@ -99,7 +99,9 @@ namespace System.Web.UI
                        if (masterPage != null) {
                                // Make sure the page exists
                                if (masterPage != null) {
-                                       MasterPageParser.GetCompiledMasterType (masterPage, MapPath (masterPage), HttpContext.Current);
+                                       string path = MapPath (masterPage);
+                                       MasterPageParser.GetCompiledMasterType (masterPage, path, HttpContext.Current);
+                                       AddDependency (path);
                                }
                        }
 #endif