private void OnContextEndRequest(object sender, EventArgs e) { if (_httpApplicationEvents != null) { _httpApplicationEvents.ContextEndRequest(sender, e); } }
public void ContextEndRequest(object sender, EventArgs e) { // Create HttpApplication, HttpContext and HttpRespoonse objects to access request and response properties. var app = (HttpApplication)sender; var context = app.Context; if (context == null) { return; } _httpApplicationEvents.ContextEndRequest(sender, e); // Get the time of request beginning var statisticsTracer = (StatisticsTracer)HttpContext.Current.Items[StatisticsSlotName]; if (statisticsTracer != null) { try { HttpContext.Current.Items.Remove(StatisticsSlotName); statisticsTracer.Dispose(); } catch (HttpException ex) { Utilities.LogException("Error in Oceanik.TranslatorModule.ContextEndRequest: " + ex.Message, EventLogEntryType.Warning); } } }