DynamicRouteValueTransformer.FilterAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
根据 返回 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>) 在基于路由值匹配零个终结点的情况下,不会调用 。