ActionDescriptor.ActionParameters in ActionExecutedContext

asp.net-mvc, asp.net-mvc-3, c#, model-view-controller

Solution

You can get the parameters and the values like so :

// Format the parameters based on our requirements: 
StringBuilder parameters = new StringBuilder();
foreach (var p in filterContext.ActionDescriptor.GetParameters())
{
     if (filterContext.Controller.ValueProvider.GetValue(p.ParameterName) != null)
     {
           parameters.AppendFormat("\r\n\t{0}\t\t:{1}", p.ParameterName,
                       filterContext.Controller.ValueProvider.GetValue(p.ParameterName).AttemptedValue);
     }
}

Problem

There is any thing like the `ActionExecutingContext's ActionDescriptor.ActionParameters` property in the `ActionExecutedContext` class? I need to investigate the action's parameters at this stage(`OnActionExecuted`).

Original source