public void OnResultExecuted(ResultExecutedContext context)
 {
     Assert.IsNotNull(context.ControllerContext);
     Assert.IsNotNull(context.Request);
     Assert.IsNotNull(context.Request.RouteValues);
     Assert.IsNotNull(context.Result);
 }
 public void OnResultExecuted(ResultExecutedContext context)
 {
     Assert.IsNotNull(context.ControllerContext);
     Assert.IsNotNull(context.Request);
     Assert.IsNotNull(context.Request.RouteValues);
     Assert.IsNotNull(context.Result);
     context.ExceptionHandled = true;
 }
示例#3
0
        /// <summary>
        /// Invokes all post-result filters, after the result has been invoked.
        /// </summary>
        /// <param name="controllerContext">The controller context.</param>
        /// <param name="actionResult">The action result.</param>
        /// <param name="exception">The exception.</param>
        /// <param name="resultFilters">The result filters.</param>
        /// <returns></returns>
        protected virtual ResultExecutedContext ExecutePostResultFilters(ControllerContext controllerContext, ActionResult actionResult, Exception exception, IEnumerable<IResultFilter> resultFilters)
        {
            controllerContext.Request.ReportProgress(new PostResultFiltersNavigationEvent());

            var context = new ResultExecutedContext(controllerContext, actionResult, exception);
            foreach (var filter in resultFilters)
            {
                filter.OnResultExecuted(context);
            }
            return context;
        }