public override void OnActionExecuting(HttpActionContext actionContext) { IServiceAwareController controller = actionContext.ControllerContext.Controller as IServiceAwareController; if (controller != null) { controller.RegisterDisposableServices(((IServiceAwareController)controller).DisposableServices); } }
public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext) { // pre-processing IServiceAwareController controller = actionContext.ControllerContext.Controller as IServiceAwareController; if (controller != null) { controller.RegisterDisposableServices(controller.DisposableServices); } }