protected override ActionResult InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary <string, object> parameters) { var allFilters = FiltersStore(controllerContext); var calledFilters = CallStore(controllerContext); var action = GlimpseFilterCallMetadata.ControllerAction(actionDescriptor, controllerContext.IsChildAction); allFilters.Add(action); var calledMetadata = new GlimpseFilterCalledMetadata { Guid = action.Guid }; calledFilters.Add(calledMetadata); var watch = new Stopwatch(); watch.Start(); var invokeActionMethod = base.InvokeActionMethod(controllerContext, actionDescriptor, parameters); watch.Stop(); calledMetadata.ExecutionTime = watch.Elapsed; return(invokeActionMethod); }
protected override void InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) { var allFilters = FiltersStore(controllerContext); var calledFilters = CallStore(controllerContext); var action = GlimpseFilterCallMetadata.ActionResult(actionResult, controllerContext.IsChildAction); allFilters.Add(action); var calledMetadata = new GlimpseFilterCalledMetadata { Guid = action.Guid }; calledFilters.Add(calledMetadata); var watch = new Stopwatch(); watch.Start(); base.InvokeActionResult(controllerContext, actionResult); watch.Stop(); calledMetadata.ExecutionTime = watch.Elapsed; }
public void Intercept(IInvocation invocation) { //protected override ActionResult InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<string, object> parameters) var controllerContext = (ControllerContext)invocation.Arguments[0]; var actionDescriptor = (ActionDescriptor)invocation.Arguments[1]; var allFilters = controllerContext.FiltersStore(); var calledFilters = controllerContext.CallStore(); var action = GlimpseFilterCallMetadata.ControllerAction(actionDescriptor, controllerContext.IsChildAction); allFilters.Add(action); var calledMetadata = new GlimpseFilterCalledMetadata { Guid = action.Guid}; calledFilters.Add(calledMetadata); var watch = new Stopwatch(); watch.Start(); invocation.Proceed(); watch.Stop(); calledMetadata.ExecutionTime = watch.Elapsed; }
public GlimpseFilterCalledMetadata LogCall(Guid guid) { var metadata = new GlimpseFilterCalledMetadata { Guid = guid }; Store.Add(metadata); return(metadata); }
public void Intercept(IInvocation invocation) { //protected override void InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) var controllerContext = (ControllerContext) invocation.Arguments[0]; var actionResult = (ActionResult)invocation.Arguments[1]; var allFilters = controllerContext.FiltersStore(); var calledFilters = controllerContext.CallStore(); var action = GlimpseFilterCallMetadata.ActionResult(actionResult, controllerContext.IsChildAction); allFilters.Add(action); var calledMetadata = new GlimpseFilterCalledMetadata { Guid = action.Guid}; calledFilters.Add(calledMetadata); var watch = new Stopwatch(); watch.Start(); invocation.Proceed(); watch.Stop(); calledMetadata.ExecutionTime = watch.Elapsed; }
protected override void InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) { var allFilters = FiltersStore(controllerContext); var calledFilters = CallStore(controllerContext); var action = GlimpseFilterCallMetadata.ActionResult(actionResult, controllerContext.IsChildAction); allFilters.Add(action); var calledMetadata = new GlimpseFilterCalledMetadata { Guid = action.Guid}; calledFilters.Add(calledMetadata); var watch = new Stopwatch(); watch.Start(); base.InvokeActionResult(controllerContext, actionResult); watch.Stop(); calledMetadata.ExecutionTime = watch.Elapsed; }
protected override ActionResult InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<string, object> parameters) { var allFilters = FiltersStore(controllerContext); var calledFilters = CallStore(controllerContext); var action = GlimpseFilterCallMetadata.ControllerAction(actionDescriptor, controllerContext.IsChildAction); allFilters.Add(action); var calledMetadata = new GlimpseFilterCalledMetadata { Guid = action.Guid}; calledFilters.Add(calledMetadata); var watch = new Stopwatch(); watch.Start(); var invokeActionMethod = base.InvokeActionMethod(controllerContext, actionDescriptor, parameters); watch.Stop(); calledMetadata.ExecutionTime = watch.Elapsed; return invokeActionMethod; }
public GlimpseFilterCalledMetadata LogCall(Guid guid) { var metadata = new GlimpseFilterCalledMetadata{Guid = guid}; Store.Add(metadata); return metadata; }