ApiControllerActionInvoker.InvokeActionAsync Method
Asynchronously invokes the specified action by using the specified controller context.
Namespace: System.Web.Http.Controllers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Overridable Function InvokeActionAsync ( _
actionContext As HttpActionContext, _
cancellationToken As CancellationToken _
) As Task(Of HttpResponseMessage)
'Usage
Dim instance As ApiControllerActionInvoker
Dim actionContext As HttpActionContext
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of HttpResponseMessage)
returnValue = instance.InvokeActionAsync(actionContext, _
cancellationToken)
public virtual Task<HttpResponseMessage> InvokeActionAsync(
HttpActionContext actionContext,
CancellationToken cancellationToken
)
public:
virtual Task<HttpResponseMessage^>^ InvokeActionAsync(
HttpActionContext^ actionContext,
CancellationToken cancellationToken
)
abstract InvokeActionAsync :
actionContext:HttpActionContext *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
override InvokeActionAsync :
actionContext:HttpActionContext *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
public function InvokeActionAsync(
actionContext : HttpActionContext,
cancellationToken : CancellationToken
) : Task<HttpResponseMessage>
Parameters
actionContext
Type: System.Web.Http.Controllers.HttpActionContextThe controller context.
cancellationToken
Type: System.Threading.CancellationTokenThe cancellation token.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
The invoked action.
Implements
IHttpActionInvoker.InvokeActionAsync(HttpActionContext, CancellationToken)