コード例 #1
0
 public static void RegisterForDispose(this HttpContextBase context, IDisposable resource)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     RequestResourceTracker.RegisterForDispose(context, resource);
 }
コード例 #2
0
        internal static void OnEndRequest(object sender, EventArgs e)
        {
            if (EndRequest != null)
            {
                EndRequest(sender, e);
            }

            var app = (HttpApplication)sender;

            RequestResourceTracker.DisposeResources(new HttpContextWrapper(app.Context));
        }