Bring arguments inline between before/after events

This commit is contained in:
Anthony van der Hoorn 2015-10-05 09:59:11 -07:00 committed by Ryan Nowak
parent 32c174c791
commit a0764faa86
2 changed files with 14 additions and 3 deletions

View File

@ -625,7 +625,12 @@ namespace Microsoft.AspNet.Mvc.Controllers
{
_telemetry.WriteTelemetry(
"Microsoft.AspNet.Mvc.BeforeActionMethod",
new { actionContext = ActionContext, arguments = _actionExecutingContext.ActionArguments });
new
{
actionContext = ActionContext,
arguments = _actionExecutingContext.ActionArguments,
controller = _actionExecutingContext.Controller
});
}
result = await InvokeActionAsync(_actionExecutingContext);
@ -636,7 +641,13 @@ namespace Microsoft.AspNet.Mvc.Controllers
{
_telemetry.WriteTelemetry(
"Microsoft.AspNet.Mvc.AfterActionMethod",
new { actionContext = ActionContext, result = result });
new
{
actionContext = ActionContext,
arguments = _actionExecutingContext.ActionArguments,
controller = _actionExecutingContext.Controller,
result = result
});
}
}

View File

@ -101,7 +101,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
{
_telemetry.WriteTelemetry(
"Microsoft.AspNet.Mvc.AfterAction",
new { actionDescriptor, httpContext = context.HttpContext });
new { actionDescriptor, httpContext = context.HttpContext, routeData = context.RouteData });
}
if (!context.IsHandled)