RequestDelegateFactory.InferMetadata 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
針對 所建立的 自動傳回推斷的 RequestDelegateCreate(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) 中繼資料。
這包括由 IEndpointMetadataProvider 參數推斷和 IEndpointParameterMetadataProvider 實作的中繼資料,以及將型別傳回至 methodInfo
。
public static Microsoft.AspNetCore.Http.RequestDelegateMetadataResult InferMetadata (System.Reflection.MethodInfo methodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default);
static member InferMetadata : System.Reflection.MethodInfo * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions -> Microsoft.AspNetCore.Http.RequestDelegateMetadataResult
Public Shared Function InferMetadata (methodInfo As MethodInfo, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateMetadataResult
參數
- methodInfo
- MethodInfo
要 MethodInfo 傳遞至 Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) 之路由處理常式的 。
- options
- RequestDelegateFactoryOptions
呼叫 Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) 時將使用的選項。
傳回
RequestDelegateMetadataResult要傳遞至 Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) 的 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應