Class XmlCommentsDocumentTransformer
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.AspNetCore.Transformers
Assembly: Cephalon.AspNetCore.dll
Enriches generated OpenAPI schemas with XML documentation comments discovered from loaded assemblies.
public sealed class XmlCommentsDocumentTransformer : IOpenApiDocumentTransformerInheritance
Section titled “Inheritance”object ← XmlCommentsDocumentTransformer
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”This transformer keeps OpenAPI descriptions aligned with the XML comments written on public contracts, including summaries, remarks, and examples when available.
Constructors
Section titled “Constructors”XmlCommentsDocumentTransformer(string[]?)
Section titled “ XmlCommentsDocumentTransformer(string[]?)”Enriches generated OpenAPI schemas with XML documentation comments discovered from loaded assemblies.
public XmlCommentsDocumentTransformer(string[]? xmlFiles = null)Parameters
Section titled “Parameters”xmlFiles string[]?
Optional explicit XML documentation files to scan. When omitted, the transformer searches the current application assemblies and base directory for generated XML documentation files.
Remarks
Section titled “Remarks”This transformer keeps OpenAPI descriptions aligned with the XML comments written on public contracts, including summaries, remarks, and examples when available.
Methods
Section titled “Methods”TransformAsync(OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken)
Section titled “ TransformAsync(OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken)”Applies XML comment data to the OpenAPI document schemas produced for the current request.
public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken)Parameters
Section titled “Parameters”document OpenApiDocument
The OpenAPI document being transformed.
context OpenApiDocumentTransformerContext
The transformation context for the current document generation.
cancellationToken CancellationToken
A token that can cancel document transformation.
Returns
Section titled “Returns”A task that completes when the transformation has finished.