public static void RegisterForDispose(this HttpContextBase context, IDisposable resource) { if (context == null) { throw new ArgumentNullException("context"); } RequestResourceTracker.RegisterForDispose(context, resource); }
internal static void OnEndRequest(object sender, EventArgs e) { if (EndRequest != null) { EndRequest(sender, e); } var app = (HttpApplication)sender; RequestResourceTracker.DisposeResources(new HttpContextWrapper(app.Context)); }