共用方式為


OpenApiOptions.AddDocumentTransformer 方法

定義

多載

AddDocumentTransformer(IOpenApiDocumentTransformer)

在目前 OpenApiOptions 實例上註冊指定的 IOpenApiDocumentTransformer 實例。

AddDocumentTransformer(Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>)

在目前的 OpenApiOptions 實例上,將指定的委派註冊為文件轉換器。

AddDocumentTransformer<TTransformerType>()

在目前的 OpenApiOptions 實例上註冊新的文件轉換器。

AddDocumentTransformer(IOpenApiDocumentTransformer)

來源:
OpenApiOptions.cs
來源:
OpenApiOptions.cs

在目前 OpenApiOptions 實例上註冊指定的 IOpenApiDocumentTransformer 實例。

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer transformer);
member this.AddDocumentTransformer : Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer -> Microsoft.AspNetCore.OpenApi.OpenApiOptions
Public Function AddDocumentTransformer (transformer As IOpenApiDocumentTransformer) As OpenApiOptions

參數

transformer
IOpenApiDocumentTransformer

要使用的 IOpenApiDocumentTransformer 實例。

傳回

用於進一步自定義的 OpenApiOptions 實例。

適用於

AddDocumentTransformer(Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>)

來源:
OpenApiOptions.cs
來源:
OpenApiOptions.cs

在目前的 OpenApiOptions 實例上,將指定的委派註冊為文件轉換器。

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer(Func<Microsoft.OpenApi.Models.OpenApiDocument,Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext,System.Threading.CancellationToken,System.Threading.Tasks.Task> transformer);
member this.AddDocumentTransformer : Func<Microsoft.OpenApi.Models.OpenApiDocument, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext, System.Threading.CancellationToken, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.OpenApi.OpenApiOptions
Public Function AddDocumentTransformer (transformer As Func(Of OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken, Task)) As OpenApiOptions

參數

transformer
Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>

代表文件轉換器的委派。

傳回

用於進一步自定義的 OpenApiOptions 實例。

適用於

AddDocumentTransformer<TTransformerType>()

來源:
OpenApiOptions.cs
來源:
OpenApiOptions.cs

在目前的 OpenApiOptions 實例上註冊新的文件轉換器。

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer<TTransformerType>() where TTransformerType : Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer;
member this.AddDocumentTransformer : unit -> Microsoft.AspNetCore.OpenApi.OpenApiOptions (requires 'ransformerType :> Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer)
Public Function AddDocumentTransformer(Of TTransformerType As IOpenApiDocumentTransformer) () As OpenApiOptions

類型參數

TTransformerType

要具現化的 IOpenApiDocumentTransformer 型別。

傳回

用於進一步自定義的 OpenApiOptions 實例。

適用於