• Orchard源码分析(5.3):EndRequest事件处理(DefaultOrchardHost.EndRequest方法)


    EndRequest事件处理的作用是处理完"处理引擎(ProcessingEngine)"中的任务(Task)。
     
            void IOrchardHost .EndRequest() {
                Logger.Debug( "EndRequest");
                EndRequest();
            }
      
             protected virtual void EndRequest() {
                // Synchronously process all pending tasks. It's safe to do this at this point
                // of the pipeline, as the request transaction has been closed, so creating a new
                // environment and transaction for these tasks will behave as expected.)
                while (_processingEngine.AreTasksPending()) {
                    _processingEngine.ExecuteNextTask();
                }
            }
     
    "操作引擎(Processing Engine)" 是一个任务容器,EndRequest中对添加到容器内的任务进行同步处理。关于"操作引擎"我们在适当的时候来分析。
     
    相关类型:
    Orchard.Environment.State.DefaultProcessingEngine: IProcessingEngine
    Orchard.Environment.State.ShellStateCoordinator : IShellStateManagerEventHandler, IShellDescriptorManagerEventHandler
    Orchard.Warmup.Services.WarmupScheduler : IWarmupScheduler, IWarmupEventHandler
    Orchard.Recipes.Services.RecipeScheduler : IRecipeScheduler, IRecipeSchedulerEventHandler
    Orchard.Indexing.Services.UpdateIndexScheduler : IUpdateIndexScheduler, IIndexNotifierHandler
  • 相关阅读:
    sql server 2005中模仿merge的使用方法
    c#中怎么控制session失效时间
    MasterPage,Page 2者之间事件的执行顺序
    ToolStripComboBox的DataSource和DataTable
    C#综合揭秘——细说多线程(上)(转载)
    SQL Server 2008 MERGE
    SQL output语句的用法
    SQL中使用update inner join和delete inner join
    C#综合揭秘——细说事务(转载)
    SQLMETAL :Linq对象生成
  • 原文地址:https://www.cnblogs.com/lhxsoft/p/5322593.html
Copyright © 2020-2023  润新知