Share via


DynamicRouteValueTransformer.FilterAsync 方法

定义

根据 返回 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))

参数

httpContext
HttpContext

HttpContext 当前请求关联的 。

endpoints
IReadOnlyList<Endpoint>

根据 返回的路由值作为查找结果选择的 TransformAsync(HttpContext, RouteValueDictionary)终结点。

返回

异步返回要应用于匹配集合的终结点列表。

注解

FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList<Endpoint>) 实现可以通过返回基于 的新终结点列表,进一步优化根据路由值匹配选择的 endpoints终结点列表。

FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList<Endpoint>) 在基于路由值匹配零个终结点的情况下,不会调用 。

适用于