public static void Flush() { Workbench current = (Workbench)CallContext.GetData(WorkbenchKey); if (current != null) { current.InnerFlush(); } }
public static void Reset() { Workbench current = (Workbench)CallContext.GetData(WorkbenchKey); if (current != null) { CallContext.SetData(WorkbenchKey, null); } }
private void OnEndRequest(object sender, EventArgs e) { for (var i = modules.Count - 1; i >= 0; i--) { try { modules[i].EndRequest((HttpApplication)sender); } catch { } } Workbench.Dispose(); }
/// <summary> /// 执行与释放或重置非托管资源相关的应用程序定义的任务。 /// </summary> public static void Dispose() { Workbench current = (Workbench)CallContext.GetData(WorkbenchKey); if (current != null) { ((IDisposable)current).Dispose(); } //current = new Workbench(); //CallContext.SetData(WorkbenchKey, current); }