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: IProcessingEngineOrchard.Environment.State.ShellStateCoordinator : IShellStateManagerEventHandler, IShellDescriptorManagerEventHandlerOrchard.Warmup.Services.WarmupScheduler : IWarmupScheduler, IWarmupEventHandlerOrchard.Recipes.Services.RecipeScheduler : IRecipeScheduler, IRecipeSchedulerEventHandlerOrchard.Indexing.Services.UpdateIndexScheduler : IUpdateIndexScheduler, IIndexNotifierHandler