PublicApiFormatter Class
Formats the symbols of a PublicApiAssembly as C# code.
public static class PublicApiFormatterMethods
| Name | Description |
|---|---|
| Format(PublicApiAttribute, PublicApiFormattingOptions?) | Formats an attribute (e.g. [System.Obsolete("Use another method")]), whether or not the attribute filter selects it. |
| Format(PublicApiSymbol, PublicApiFormattingOptions?) | Formats a type or a member. |
| Format(PublicApiTypeReference, PublicApiFormattingOptions?) | Formats a type reference (e.g. System.Collections.Generic.List<string?>). |
Format overloads
Format(PublicApiAttribute, PublicApiFormattingOptions?)
PublicApiFormatter.csFormats an attribute (e.g. [System.Obsolete("Use another method")]), whether or not the attribute filter selects it.
public static PublicApiFormattedDeclaration Format(PublicApiAttribute attribute, PublicApiFormattingOptions? options = null)Format(PublicApiSymbol, PublicApiFormattingOptions?)
PublicApiFormatter.csFormats a type or a member.
public static PublicApiFormattedDeclaration Format(PublicApiSymbol symbol, PublicApiFormattingOptions? options = null)Parameters
symbolPublicApiSymboloptionsPublicApiFormattingOptions?
Returns
Remarks
An accessor is formatted as its property, restricted to this accessor in the PublicApiDeclarationStyle.Declaration style, or as its event.
Format(PublicApiTypeReference, PublicApiFormattingOptions?)
PublicApiFormatter.csFormats a type reference (e.g. System.Collections.Generic.List<string?>).
public static PublicApiFormattedDeclaration Format(PublicApiTypeReference type, PublicApiFormattingOptions? options = null)