C# Class WebApiDoodle.Web.Controllers.ApiControllerBase

Base APiController class which provides aditional two methods that run before and after the controller execution
Inheritance: ApiController, IApiControllerBase
ファイルを表示 Open project: tugberkugurlu/WebAPIDoodle

Public Methods

Method Description
ExecuteAsync ( System.Web.Http.Controllers.HttpControllerContext controllerContext, CancellationToken cancellationToken ) : Task
OnControllerExecuted ( HttpResponseMessage response ) : void

The method which will run just after the controller execution. If the returned Task{HttpResponseMessage} object is not in the RanToCompletion state, the povided HttpResponseMessage parameter will be null.

OnControllerExecuting ( HttpControllerExecutingContext controllerExecutingContext ) : void

The method which will run just before the controller execution. If this method sets HttpControllerExecutingContext.Response property to a non-null value, then the controller execution will be terminated and the given response message will be pass through.

Method Details

ExecuteAsync() public method

public ExecuteAsync ( System.Web.Http.Controllers.HttpControllerContext controllerContext, CancellationToken cancellationToken ) : Task
controllerContext System.Web.Http.Controllers.HttpControllerContext
cancellationToken System.Threading.CancellationToken
return Task

OnControllerExecuted() public method

The method which will run just after the controller execution. If the returned Task{HttpResponseMessage} object is not in the RanToCompletion state, the povided HttpResponseMessage parameter will be null.
public OnControllerExecuted ( HttpResponseMessage response ) : void
response System.Net.Http.HttpResponseMessage
return void

OnControllerExecuting() public method

The method which will run just before the controller execution. If this method sets HttpControllerExecutingContext.Response property to a non-null value, then the controller execution will be terminated and the given response message will be pass through.
public OnControllerExecuting ( HttpControllerExecutingContext controllerExecutingContext ) : void
controllerExecutingContext HttpControllerExecutingContext
return void