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
).
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);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With