ApiController.ExecuteAsync Method
Executes asynchronously a single HTTP operation.
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Overridable Function ExecuteAsync ( _
controllerContext As HttpControllerContext, _
cancellationToken As CancellationToken _
) As Task(Of HttpResponseMessage)
'Usage
Dim instance As ApiController
Dim controllerContext As HttpControllerContext
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of HttpResponseMessage)
returnValue = instance.ExecuteAsync(controllerContext, _
cancellationToken)
public virtual Task<HttpResponseMessage> ExecuteAsync(
HttpControllerContext controllerContext,
CancellationToken cancellationToken
)
public:
virtual Task<HttpResponseMessage^>^ ExecuteAsync(
HttpControllerContext^ controllerContext,
CancellationToken cancellationToken
)
abstract ExecuteAsync :
controllerContext:HttpControllerContext *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
override ExecuteAsync :
controllerContext:HttpControllerContext *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
public function ExecuteAsync(
controllerContext : HttpControllerContext,
cancellationToken : CancellationToken
) : Task<HttpResponseMessage>
Parameters
controllerContext
Type: System.Web.Http.Controllers.HttpControllerContextThe controller context for a single HTTP operation.
cancellationToken
Type: System.Threading.CancellationTokenThe cancellation token assigned for the HTTP operation.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
The newly started task.
Implements
IHttpController.ExecuteAsync(HttpControllerContext, CancellationToken)