Ejemplo n.º 1
0
        private void begin(Object source, EventArgs e)
        {
            IWatchService iWatch = ServiceFactory.WatchService;

            iWatch.Start();
            ((HttpApplication)source).Context.Items.Add(Constants.WatchItemName, iWatch);
        }
Ejemplo n.º 2
0
        //public override void OnActionExecuting(ActionExecutingContext filterContext)
        //{
        //    base.OnActionExecuting(filterContext);
        //}

        //public override void OnActionExecuted(ActionExecutedContext filterContext)
        //{
        //    base.OnActionExecuted(filterContext);
        //}


        public void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.IsChildAction)
            {
                return;
            }
            if (_disabledWatch)
            {
                return;
            }
            IWatchService iWatch = ServiceFactory.WatchService;

            iWatch.Start();
            filterContext.HttpContext.Items.Add(Constants.WatchItemName, iWatch);
        }