Dela via


IBindableFromHttpContext<TSelf>.BindAsync Method

Definition

Creates an instance of TSelf from the HttpContext.

public static abstract System.Threading.Tasks.ValueTask<TSelf?> BindAsync (Microsoft.AspNetCore.Http.HttpContext context, System.Reflection.ParameterInfo parameter);
static member BindAsync : Microsoft.AspNetCore.Http.HttpContext * System.Reflection.ParameterInfo -> System.Threading.Tasks.ValueTask<'Self (requires 'Self : null and 'Self :> Microsoft.AspNetCore.Http.IBindableFromHttpContext<'Self>)>
Public Shared Function BindAsync (context As HttpContext, parameter As ParameterInfo) As ValueTask(Of TSelf)

Parameters

context
HttpContext

The HttpContext for the current request.

parameter
ParameterInfo

The ParameterInfo for the parameter of the route handler delegate the returned instance will populate.

Returns

ValueTask<TSelf>

The instance of TSelf.

Applies to