Exam Question
Drag and Drop
You are developing an ASP.NET MVC application.
Before an action is executed, information about the action must be written to a log. After results are returned, information about the results also must be written to the log.
You need to log the actions and results.
- OnActionExecuting(ActionExecutingContext filterContext)
- OnActionExecuted(ActionExecuted filterContext)
- OnResultExecuting(ResultExecutingContext filterContext)
- OnResultExecuted(RequlstExecutedContext filterContext)
- public class LogActionFilter : ActionFilterAttribute
- public class LogActionFilter : IActionFilter
public override void
public override void
}
Logger.Log("actionLog",filterContext.RouteData)
}public override void
Logger.Log("resultLog",filterContextRouteData);
}