Exemple #1
0
        public override void OnResultExecuted(ResultExecutedContext filterContext)
        {
            MonitorLog MonLog = filterContext.Controller.ViewData[Key] as MonitorLog;

            MonLog.ExecuteEndTime = DateTime.Now;
            LoggerHelper.Monitor(MonLog.GetLoginfo(MonitorLog.MonitorType.View));
            filterContext.Controller.ViewData.Remove(Key);
        }
Exemple #2
0
        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            MonitorLog MonLog = filterContext.Controller.ViewData[Key] as MonitorLog;

            MonLog.ExecuteEndTime   = DateTime.Now;
            MonLog.FormCollections  = filterContext.HttpContext.Request.Form;        //form表单提交的数据
            MonLog.QueryCollections = filterContext.HttpContext.Request.QueryString; //Url 参数
            LoggerHelper.Monitor(MonLog.GetLoginfo());
        }
Exemple #3
0
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            MonitorLog MonLog = new MonitorLog();

            MonLog.ExecuteStartTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss.ffff", DateTimeFormatInfo.InvariantInfo));
            MonLog.ControllerName   = filterContext.RouteData.Values["controller"] as string;
            MonLog.ActionName       = filterContext.RouteData.Values["action"] as string;

            filterContext.Controller.ViewData[Key] = MonLog;
        }
Exemple #4
0
        public override void OnResultExecuting(ResultExecutingContext filterContext)
        {
            MonitorLog MonLog = filterContext.Controller.ViewData[Key] as MonitorLog;

            MonLog.ExecuteStartTime = DateTime.Now;
        }