Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions LightInject.Web/LightInject.Web.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public class LightInjectHttpModule : IHttpModule
/// <param name="context">An <see cref="HttpApplication"/> that provides access to the methods, properties, and events common to all application objects within an ASP.NET application </param>
public void Init(HttpApplication context)
{
context.BeginRequest += (s, a) => BeginRequest();
context.EndRequest += (s, a) => EndRequest();
context.BeginRequest += BeginRequest;
context.EndRequest += EndRequest;
}

/// <summary>
Expand All @@ -104,13 +104,13 @@ public void Dispose()
{
}

private static void EndRequest()
private static void EndRequest(object sender, System.EventArgs e)
{
var scopeManager = (ScopeManager)HttpContext.Current.Items["ScopeManager"];
scopeManager.CurrentScope.Dispose();
}

private static void BeginRequest()
private static void BeginRequest(object sender, System.EventArgs e)
{
var scopeManager = new ScopeManager();
scopeManager.BeginScope();
Expand Down