BoC.Web.DataContextPerRequestHttpModule.OnEndRequest C# (CSharp) 메소드

OnEndRequest() 개인적인 메소드

private OnEndRequest ( object sender, EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
리턴 void
        private void OnEndRequest(object sender, EventArgs eventArgs)
        {
            if (!Enabled)
            {
                return;
            }

            var DataContext = ((HttpApplication)sender).Context.Items[DataContextkey] as IDataContext;
            if (DataContext != null)
            {
                DataContext.Dispose();
            }
            ((HttpApplication)sender).Context.Items.Remove(DataContextkey);
        }