共用方式為


IEndpointSelectorPolicy.ApplyAsync 方法

定義

多載

ApplyAsync(HttpContext, CandidateSet)

將原則套用至 CandidateSet

ApplyAsync(HttpContext, EndpointSelectorContext, CandidateSet)

將原則套用至 CandidateSet

ApplyAsync(HttpContext, CandidateSet)

來源:
IEndpointSelectorPolicy.cs

將原則套用至 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

參數

httpContext
HttpContext

HttpContext 目前要求相關聯的 。

candidates
CandidateSet

CandidateSet

傳回

備註

IEndpointSelectorPolicy 實作應該實作這個方法,並視需要將 設定 SetValidity(Int32, Boolean)false 為 來篩選 中的 candidates 候選項目集。

若要發出錯誤狀況的訊號,應該 IEndpointSelectorPolicy 呼叫 SetEndpoint(HttpContext, Endpoint) 端點並設定 RouteValuesEndpoint 值,以在執行時產生所需的錯誤。

適用於

ApplyAsync(HttpContext, EndpointSelectorContext, CandidateSet)

將原則套用至 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

參數

httpContext
HttpContext

HttpContext 目前要求相關聯的 。

context
EndpointSelectorContext

EndpointSelectorContext 目前要求相關聯的 。

candidates
CandidateSet

CandidateSet

傳回

備註

IEndpointSelectorPolicy 實作應該實作這個方法,並視需要將 設定 SetValidity(Int32, Boolean)false 為 來篩選 中的 candidates 候選項目集。

若要發出錯誤狀況的訊號,請將 設定 EndpointEndpoint 值,以在執行時產生所需的錯誤。

適用於