Files
mono/mcs/class/System.Web/Test/TestMonoWeb/SyncModule.cs
T
Patrik Torstensson cb4a85bc52 2002-08-05 Patrik Torstensson <[email protected]>
This is a simple test program for the new HttpRuntime execution system.

svn path=/trunk/mcs/; revision=6419
2002-08-05 14:31:22 +00:00

38 lines
1.2 KiB
C#

using System;
using System.Collections;
using System.Web;
namespace TestMonoWeb
{
public class SyncModule : IHttpModule {
public String ModuleName {
get { return "HelloWorldModule"; }
}
//In the Init function, register for HttpApplication
//events by adding your handlers.
public void Init(HttpApplication application) {
application.BeginRequest += (new EventHandler(this.Application_BeginRequest));
application.EndRequest += (new EventHandler(this.Application_EndRequest));
}
//Your BeginRequest event handler.
private void Application_BeginRequest(Object source, EventArgs e) {
HttpApplication application = (HttpApplication)source;
HttpContext context = application.Context;
context.Response.Write("SyncModule.Application_BeginRequest()<br>\n");
}
//Your EndRequest event handler.
private void Application_EndRequest(Object source, EventArgs e) {
HttpApplication application = (HttpApplication)source;
HttpContext context = application.Context;
context.Response.Write("SyncModule.Application_EndRequest()<br>\n");
}
public void Dispose() {
}
}
}