Răsfoiți Sursa

2002-06-22 Gonzalo Paniagua Javier <[email protected]>

	* Page.cs: changed InvokeEventMethod to use a GetMethod that works with
	out runtime. Renamed Page_Init and Page_Load.

	After this, we can load a dll and render HTML in linux.

svn path=/trunk/mcs/; revision=5414
Gonzalo Paniagua Javier 23 ani în urmă
părinte
comite
33e2f0ce33

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

@@ -1,3 +1,10 @@
+2002-06-22  Gonzalo Paniagua Javier <[email protected]>
+
+	* Page.cs: changed InvokeEventMethod to use a GetMethod that works with
+	out runtime. Renamed Page_Init and Page_Load.
+
+	After this, we can load a dll and render HTML in linux.
+
 2002-06-20  Gonzalo Paniagua Javier <[email protected]>
 
 	* Control.cs:

+ 6 - 8
mcs/class/System.Web/System.Web.UI/Page.cs

@@ -355,10 +355,8 @@ public class Page : TemplateControl, IHttpHandler
 	
 	private void InvokeEventMethod (string m_name, object sender, EventArgs e)
 	{
-		MethodInfo evt_method = GetType ().GetMethod(m_name,
-						BindingFlags.IgnoreCase | BindingFlags.Public |
-						BindingFlags.NonPublic | BindingFlags.DeclaredOnly |
-						BindingFlags.Instance);
+		Type [] types = new Type [] {typeof (object), typeof (EventArgs)};
+		MethodInfo evt_method = GetType ().GetMethod (m_name, types);
 
 		if (evt_method != null){
 			object [] parms = new object [2];
@@ -368,12 +366,12 @@ public class Page : TemplateControl, IHttpHandler
 		}
 	}
 
-	private void Page_Init (object sender, EventArgs e)
+	private void _Page_Init (object sender, EventArgs e)
 	{
 		InvokeEventMethod ("Page_Init", sender, e);
 	}
 
-	private void Page_Load (object sender, EventArgs e)
+	private void _Page_Load (object sender, EventArgs e)
 	{
 		InvokeEventMethod ("Page_Load", sender, e);
 	}
@@ -382,8 +380,8 @@ public class Page : TemplateControl, IHttpHandler
 	{
 		FrameworkInitialize ();
 		// This 2 should depend on AutoEventWireUp in Page directive. Defaults to true.
-		Init += new EventHandler (Page_Init);
-		Load += new EventHandler (Page_Load);
+		Init += new EventHandler (_Page_Init);
+		Load += new EventHandler (_Page_Load);
 
 		//-- Control execution lifecycle in the docs
 		OnInit (EventArgs.Empty);