* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Web / Test / TestMonoWeb / SyncModule.cs
1 using System;
2 using System.Collections;
3 using System.Web; 
4
5 namespace TestMonoWeb
6 {
7         public class SyncModule : IHttpModule {
8                 public String ModuleName { 
9                         get { return "HelloWorldModule"; } 
10                 }    
11                 //In the Init function, register for HttpApplication 
12                 //events by adding your handlers.
13                 public void Init(HttpApplication application) { 
14                         application.BeginRequest += (new EventHandler(this.Application_BeginRequest));
15                         application.EndRequest += (new EventHandler(this.Application_EndRequest));
16                 }
17     
18                 //Your BeginRequest event handler.
19                 private void Application_BeginRequest(Object source, EventArgs e) {
20                         HttpApplication application = (HttpApplication)source;
21                         HttpContext context = application.Context;
22         
23                         context.Response.Write("SyncModule.Application_BeginRequest()<br>\n");
24                 }
25     
26                 //Your EndRequest event handler.
27                 private void Application_EndRequest(Object source, EventArgs e) {
28                         HttpApplication application = (HttpApplication)source;
29                         HttpContext context = application.Context;
30         
31                         context.Response.Write("SyncModule.Application_EndRequest()<br>\n");
32                 }  
33       
34                 public void Dispose() {
35                 }
36         }
37 }