Преглед изворни кода

2008-02-05 Marek Habersack <[email protected]>

	* AspGenerator.cs: introduced a new overload for the Parse method
	which accepts a bool indicating whether or not to initialize the
	parser. The overload is used when parsing server-side
	includes. Fixes bug #357498

svn path=/trunk/mcs/; revision=94869
Marek Habersack пре 18 година
родитељ
комит
6864872b4a

+ 12 - 3
mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs

@@ -259,10 +259,19 @@ namespace System.Web.Compilation
 
 		public void Parse (string file)
 		{
-			isApplication = tparser.DefaultDirectiveName == "application";
 #if ONLY_1_1
-			InitParser (file);
+			Parse (file, true);
+#else
+			Parse (file, false);
 #endif
+		}
+		
+		public void Parse (string file, bool doInitParser)
+		{
+			isApplication = tparser.DefaultDirectiveName == "application";
+			
+			if (doInitParser)
+				InitParser (file);
 
 			pstack.Parser.Parse ();
 			if (text.Length > 0)
@@ -455,7 +464,7 @@ namespace System.Web.Compilation
 					file = GetIncludeFilePath (tparser.BaseDir, file);
 				}
 
-				Parse (file);
+				Parse (file, true);
 				break;
 			default:
 				break;

+ 7 - 0
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -1,3 +1,10 @@
+2008-02-05  Marek Habersack  <[email protected]>
+
+	* AspGenerator.cs: introduced a new overload for the Parse method
+	which accepts a bool indicating whether or not to initialize the
+	parser. The overload is used when parsing server-side
+	includes. Fixes bug #357498
+
 2008-02-04  Marek Habersack  <[email protected]>
 
 	* AssemblyBuilder.cs: do not use WebEncoding.FileEncoding when