예제 #1
0
        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);
            }
        }