EndpointSelector.SelectAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SelectAsync(HttpContext, CandidateSet) |
以非同步方式從 CandidateSet 選取 Endpoint 。 |
SelectAsync(HttpContext, EndpointSelectorContext, CandidateSet) |
以非同步方式從 CandidateSet 選取 Endpoint 。 |
SelectAsync(HttpContext, CandidateSet)
以非同步方式從 CandidateSet 選取 Endpoint 。
public:
abstract System::Threading::Tasks::Task ^ SelectAsync(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::Matching::CandidateSet ^ candidates);
public abstract System.Threading.Tasks.Task SelectAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates);
abstract member SelectAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.Matching.CandidateSet -> System.Threading.Tasks.Task
Public MustOverride Function SelectAsync (httpContext As HttpContext, candidates As CandidateSet) As Task
參數
- httpContext
- HttpContext
與 HttpContext 目前要求相關聯的 。
- candidates
- CandidateSet
傳回
, Task 一旦端點選取完成,就會以非同步方式完成。
備註
EndpointSelector在選取端點之後,應該呼叫 SetEndpoint(HttpContext, Endpoint) 並設定 RouteValues 端點來指派端點。
適用於
SelectAsync(HttpContext, EndpointSelectorContext, CandidateSet)
以非同步方式從 CandidateSet 選取 Endpoint 。
public:
abstract System::Threading::Tasks::Task ^ SelectAsync(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::EndpointSelectorContext ^ context, Microsoft::AspNetCore::Routing::Matching::CandidateSet ^ candidates);
public abstract System.Threading.Tasks.Task SelectAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.EndpointSelectorContext context, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates);
abstract member SelectAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.EndpointSelectorContext * Microsoft.AspNetCore.Routing.Matching.CandidateSet -> System.Threading.Tasks.Task
Public MustOverride Function SelectAsync (httpContext As HttpContext, context As EndpointSelectorContext, candidates As CandidateSet) As Task
參數
- httpContext
- HttpContext
與 HttpContext 目前要求相關聯的 。
- context
- EndpointSelectorContext
與 EndpointSelectorContext 目前要求相關聯的 。
- candidates
- CandidateSet
傳回
, Task 一旦端點選取完成,就會以非同步方式完成。
備註
EndpointSelector選取端點後, Endpoint 應該指派 和 RouteValues 屬性。