Kaynağa Gözat

2007-05-25 Marek Habersack <[email protected]>

	* TemplateControlCompiler.cs: Changed a few incorrect 
	ObjectCreationExpression to the correct DelegateCreationExpression.
	Fixes #81706.


svn path=/trunk/mcs/; revision=77950
Rolf Bjarne Kvinge 18 yıl önce
ebeveyn
işleme
c1af7a324d

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

@@ -1,3 +1,9 @@
+2007-05-25  Marek Habersack  <[email protected]>
+
+	* TemplateControlCompiler.cs: Changed a few incorrect 
+	ObjectCreationExpression to the correct DelegateCreationExpression.
+	Fixes #81706.
+
 2007-05-24  Marek Habersack  <[email protected]>
 
 	* PageCompiler.cs: added support for the PreviousPageType directive.

+ 6 - 6
mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs

@@ -1019,11 +1019,11 @@ namespace System.Web.Compilation
 		{
 			CodePropertyReferenceExpression prop = new CodePropertyReferenceExpression (ctrlVar, name);
 
-			CodeObjectCreateExpression newBuild = new CodeObjectCreateExpression (typeof (BuildTemplateMethod));
-			newBuild.Parameters.Add (new CodeMethodReferenceExpression (thisRef, methodName));
+			CodeDelegateCreateExpression newBuild = new CodeDelegateCreateExpression (
+				new CodeTypeReference (typeof (BuildTemplateMethod)), thisRef, methodName);
 
-			CodeObjectCreateExpression newExtract = new CodeObjectCreateExpression (typeof (ExtractTemplateValuesMethod));
-			newExtract.Parameters.Add (new CodeMethodReferenceExpression (thisRef, extractMethodName));
+			CodeDelegateCreateExpression newExtract = new CodeDelegateCreateExpression (
+				new CodeTypeReference (typeof (ExtractTemplateValuesMethod)), thisRef, extractMethodName);
 
 			CodeObjectCreateExpression newCompiled = new CodeObjectCreateExpression (typeof (CompiledBindableTemplateBuilder));
 			newCompiled.Parameters.Add (newBuild);
@@ -1095,8 +1095,8 @@ namespace System.Web.Compilation
 
 		void AddContentTemplateInvocation (ContentBuilderInternal cbuilder, CodeMemberMethod method, string methodName)
 		{
-			CodeObjectCreateExpression newBuild = new CodeObjectCreateExpression (typeof (BuildTemplateMethod));
-			newBuild.Parameters.Add (new CodeMethodReferenceExpression (thisRef, methodName));
+			CodeDelegateCreateExpression newBuild = new CodeDelegateCreateExpression (
+				new CodeTypeReference (typeof (BuildTemplateMethod)), thisRef, methodName);
 
 			CodeObjectCreateExpression newCompiled = new CodeObjectCreateExpression (typeof (CompiledTemplateBuilder));
 			newCompiled.Parameters.Add (newBuild);