public void StartRequestExecution(IProxyActionDescriptor actionDescriptor)
 {
     _requestExecution = Stopwatch.GetTimestamp();
     if (actionDescriptor != null)
     {
         SetPageName($"{actionDescriptor.ControllerName}.{actionDescriptor.ActionName}");
     }
 }
 public virtual void OnAfterAction(
     IProxyHttpContext httpContext,
     IProxyActionDescriptor actionDescriptor)
 {
     AfterAction = new OnAfterActionEventData()
     {
         ActionDescriptor = actionDescriptor,
         HttpContext = httpContext,
     };
 }
 public virtual void OnAfterAction(
     IProxyHttpContext httpContext,
     IProxyActionDescriptor actionDescriptor)
 {
     AfterAction = new OnAfterActionEventData()
     {
         ActionDescriptor = actionDescriptor,
         HttpContext      = httpContext,
     };
 }
 public virtual void OnViewComponentAfterViewExecute(
     IProxyActionDescriptor actionDescriptor,
     IProxyViewComponentContext viewComponentContext,
     IProxyView view)
 {
     ViewComponentAfterViewExecute = new OnViewComponentAfterViewExecuteEventData()
     {
         ActionDescriptor     = actionDescriptor,
         ViewComponentContext = viewComponentContext,
         View = view
     };
 }
 public virtual void OnBeforeViewComponent(
     IProxyActionDescriptor actionDescriptor,
     IProxyViewComponentContext viewComponentContext,
     object viewComponent)
 {
     BeforeViewComponent = new OnBeforeViewComponentEventData()
     {
         ActionDescriptor     = actionDescriptor,
         ViewComponentContext = viewComponentContext,
         ViewComponent        = viewComponent
     };
 }
 public virtual void OnBeforeAction(
     IProxyHttpContext httpContext,
     IProxyRouteData routeData,
     IProxyActionDescriptor actionDescriptor)
 {
     BeforeAction = new OnBeforeActionEventData()
     {
         ActionDescriptor = actionDescriptor,
         HttpContext      = httpContext,
         RouteData        = routeData,
     };
 }
 public virtual void OnBeforeAction(
     IProxyHttpContext httpContext,
     IProxyRouteData routeData,
     IProxyActionDescriptor actionDescriptor)
 {
     BeforeAction = new OnBeforeActionEventData()
     {
         ActionDescriptor = actionDescriptor,
         HttpContext = httpContext,
         RouteData = routeData,
     };
 }
 public virtual void OnAfterViewComponent(
     IProxyActionDescriptor actionDescriptor,
     IProxyViewComponentContext viewComponentContext,
     IProxyViewComponentResult viewComponentResult,
     object viewComponent)
 {
     AfterViewComponent = new OnAfterViewComponentEventData()
     {
         ActionDescriptor     = actionDescriptor,
         ViewComponentContext = viewComponentContext,
         ViewComponentResult  = viewComponentResult,
         ViewComponent        = viewComponent
     };
 }
 public virtual void OnAfterViewPage(
     IProxyPage page,
     IProxyViewContext viewContext,
     IProxyActionDescriptor actionDescriptor,
     IProxyHttpContext httpContext)
 {
     AfterViewPage = new OnAfterViewPageEventData()
     {
         Page             = page,
         ViewContext      = viewContext,
         ActionDescriptor = actionDescriptor,
         HttpContext      = httpContext,
     };
 }
Exemple #10
0
 public virtual void OnViewComponentBeforeViewExecute(
     IProxyActionDescriptor actionDescriptor,
     IProxyViewComponentContext viewComponentContext,
     IProxyView view)
 {
     ViewComponentBeforeViewExecute = new OnViewComponentBeforeViewExecuteEventData()
     {
         ActionDescriptor = actionDescriptor,
         ViewComponentContext = viewComponentContext,
         View = view
     };
 }
Exemple #11
0
 public virtual void OnBeforeViewComponent(
     IProxyActionDescriptor actionDescriptor,
     IProxyViewComponentContext viewComponentContext,
     object viewComponent)
 {
     BeforeViewComponent = new OnBeforeViewComponentEventData()
     {
         ActionDescriptor = actionDescriptor,
         ViewComponentContext = viewComponentContext,
         ViewComponent = viewComponent
     };
 }
Exemple #12
0
 public virtual void OnAfterViewComponent(
     IProxyActionDescriptor actionDescriptor,
     IProxyViewComponentContext viewComponentContext,
     IProxyViewComponentResult viewComponentResult,
     object viewComponent)
 {
     AfterViewComponent = new OnAfterViewComponentEventData()
     {
         ActionDescriptor = actionDescriptor,
         ViewComponentContext = viewComponentContext,
         ViewComponentResult = viewComponentResult,
         ViewComponent = viewComponent
     };
 }
Exemple #13
0
 public virtual void BeforeOnResourceExecution(IProxyActionContext resourceExecutingContext, IProxyActionDescriptor actionDescriptor)
 {
     resourceExecutingContext?.HttpContext?.Features.Get <ActionMetric>()?.StartRequestExecution(actionDescriptor);
 }
Exemple #14
0
 public virtual void AfterOnResourceExecuted(IProxyActionContext resourceExecutedContext, IProxyActionDescriptor actionDescriptor)
 {
     resourceExecutedContext?.HttpContext?.Features.Get <ActionMetric>()?.StopRequestExecution();
 }
Exemple #15
0
 public virtual void AfterOnAuthorization(IProxyActionContext actionContext, IProxyActionDescriptor actionDescriptor)
 {
     actionContext?.HttpContext?.Features.Get <ActionMetric>()?.StopRequestAuthorization();
 }
 public virtual void BeforeOnAuthorization(IProxyActionContext actionContext, IProxyActionDescriptor actionDescriptor)
 {
     actionContext?.HttpContext?.Features.Get <RequestMetric>()?.StartRequestAuthorization();
 }