using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
///
/// Summary description for OmaMoodul
///
///
namespace Moodulid
{
public class OmaMoodul : IHttpModule
{
public OmaMoodul()
{
//
// TODO: Add constructor logic here
//
}
#region IHttpModule Members
public void Dispose()
{
}
public void Init(HttpApplication context)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
context.EndRequest += new EventHandler(context_EndRequest);
}
void context_EndRequest(object sender, EventArgs e)
{
HttpApplication app = sender as HttpApplication;
HttpContext cx = app.Context as HttpContext;
cx.Response.Write("
Oma HTTP moodul: Lõppeb request
");
}
void context_BeginRequest(object sender, EventArgs e)
{
HttpApplication app = sender as HttpApplication;
HttpContext cx = app.Context as HttpContext;
cx.Response.Write("
Oma HTTP moodul: Algab request
");
}
#endregion
}
}