Share via


DynamicRouteValueTransformer.FilterAsync Method

Definition

Filters the set of endpoints that were chosen as a result of lookup based on the route values returned by TransformAsync(HttpContext, RouteValueDictionary).

public:
 virtual System::Threading::Tasks::ValueTask<System::Collections::Generic::IReadOnlyList<Microsoft::AspNetCore::Http::Endpoint ^> ^> FilterAsync(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ values, System::Collections::Generic::IReadOnlyList<Microsoft::AspNetCore::Http::Endpoint ^> ^ endpoints);
public virtual System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint>> FilterAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary values, System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint> endpoints);
abstract member FilterAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.RouteValueDictionary * System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint> -> System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint>>
override this.FilterAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.RouteValueDictionary * System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint> -> System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Http.Endpoint>>
Public Overridable Function FilterAsync (httpContext As HttpContext, values As RouteValueDictionary, endpoints As IReadOnlyList(Of Endpoint)) As ValueTask(Of IReadOnlyList(Of Endpoint))

Parameters

httpContext
HttpContext

The HttpContext associated with the current request.

endpoints
IReadOnlyList<Endpoint>

The endpoints that were chosen as a result of lookup based on the route values returned by TransformAsync(HttpContext, RouteValueDictionary).

Returns

Asynchronously returns a list of endpoints to apply to the matches collection.

Remarks

Implementations of FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList<Endpoint>) may further refine the list of endpoints chosen based on route value matching by returning a new list of endpoints based on endpoints.

FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList<Endpoint>) will not be called in the case where zero endpoints were matched based on route values.

Applies to