コード例 #1
0
        public static void Flush()
        {
            Workbench current = (Workbench)CallContext.GetData(WorkbenchKey);

            if (current != null)
            {
                current.InnerFlush();
            }
        }
コード例 #2
0
        public static void Reset()
        {
            Workbench current = (Workbench)CallContext.GetData(WorkbenchKey);

            if (current != null)
            {
                CallContext.SetData(WorkbenchKey, null);
            }
        }
コード例 #3
0
 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();
 }
コード例 #4
0
        /// <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);
        }