共用方式為


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>) 不會在以路由值為基礎的零個端點相符的情況下呼叫。

適用於