C# Class SampleApplication.Controllers.FilterInjectionExample.LogFilter

A filter that loggs an actions.
Inheritance: Ninject.Web.WebApi.Filter.AbstractActionFilter
显示文件 Open project: ninject/Ninject.Web.WebApi

Public Methods

Method Description
LogFilter ( log4net.ILog log, string prefix ) : System.Web.Http.Controllers

Initializes a new instance of the LogFilter class.

OnActionExecuted ( System actionExecutedContext ) : void

Called after the action method executes. Logs that an action was executed.

OnActionExecuting ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void

Called before an action method executes. Logs that an action is beeing executed.

Method Details

LogFilter() public method

Initializes a new instance of the LogFilter class.
public LogFilter ( log4net.ILog log, string prefix ) : System.Web.Http.Controllers
log log4net.ILog The logger used to log.
prefix string The prefix.
return System.Web.Http.Controllers

OnActionExecuted() public method

Called after the action method executes. Logs that an action was executed.
public OnActionExecuted ( System actionExecutedContext ) : void
actionExecutedContext System The action executed context.
return void

OnActionExecuting() public method

Called before an action method executes. Logs that an action is beeing executed.
public OnActionExecuting ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void
actionContext System.Web.Http.Controllers.HttpActionContext The action context.
return void