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); }
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()); }
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; }
public override void OnResultExecuting(ResultExecutingContext filterContext) { MonitorLog MonLog = filterContext.Controller.ViewData[Key] as MonitorLog; MonLog.ExecuteStartTime = DateTime.Now; }