Delen via


IEndpointSelectorPolicy.ApplyAsync Method

Definition

Overloads

ApplyAsync(HttpContext, CandidateSet)

Applies the policy to the CandidateSet.

ApplyAsync(HttpContext, EndpointSelectorContext, CandidateSet)

Applies the policy to the CandidateSet.

ApplyAsync(HttpContext, CandidateSet)

Source:
IEndpointSelectorPolicy.cs

Applies the policy to the CandidateSet.

public:
 System::Threading::Tasks::Task ^ ApplyAsync(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::Matching::CandidateSet ^ candidates);
public System.Threading.Tasks.Task ApplyAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates);
abstract member ApplyAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.Matching.CandidateSet -> System.Threading.Tasks.Task
Public Function ApplyAsync (httpContext As HttpContext, candidates As CandidateSet) As Task

Parameters

httpContext
HttpContext

The HttpContext associated with the current request.

candidates
CandidateSet

The CandidateSet.

Returns

Remarks

Implementations of IEndpointSelectorPolicy should implement this method and filter the set of candidates in the candidates by setting SetValidity(Int32, Boolean) to false where desired.

To signal an error condition, the IEndpointSelectorPolicy should assign the endpoint by calling SetEndpoint(HttpContext, Endpoint) and setting RouteValues to an Endpoint value that will produce the desired error when executed.

Applies to

ApplyAsync(HttpContext, EndpointSelectorContext, CandidateSet)

Applies the policy to the CandidateSet.

public:
 System::Threading::Tasks::Task ^ ApplyAsync(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::EndpointSelectorContext ^ context, Microsoft::AspNetCore::Routing::Matching::CandidateSet ^ candidates);
public System.Threading.Tasks.Task ApplyAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.EndpointSelectorContext context, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates);
abstract member ApplyAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.EndpointSelectorContext * Microsoft.AspNetCore.Routing.Matching.CandidateSet -> System.Threading.Tasks.Task
Public Function ApplyAsync (httpContext As HttpContext, context As EndpointSelectorContext, candidates As CandidateSet) As Task

Parameters

httpContext
HttpContext

The HttpContext associated with the current request.

context
EndpointSelectorContext

The EndpointSelectorContext associated with the current request.

candidates
CandidateSet

The CandidateSet.

Returns

Remarks

Implementations of IEndpointSelectorPolicy should implement this method and filter the set of candidates in the candidates by setting SetValidity(Int32, Boolean) to false where desired.

To signal an error condition, set Endpoint to an Endpoint value that will produce the desired error when executed.

Applies to