PublicApiSymbol Class
A type or a member that is part of the public API of an assembly.
public abstract class PublicApiSymbolRemarks
Symbols only contain data decoded from metadata. They remain valid after the assembly file or stream is closed.
Properties
| Name | Description |
|---|---|
| Accessibility | |
| Assembly | Gets the assembly that declares the symbol. |
| Attributes | Gets all the custom attributes applied to the symbol, including the ones that are not displayed by the C# formatter. |
| DeclaringType | Gets the type that declares the symbol. It is null for top-level types. |
| DocumentationId | Gets the XML documentation ID of the symbol, as generated by the C# compiler (e.g. M:System.String.Join(System.String,System.String[])). It matches the name attribute of the member elements of the XML documentation file. |
| Identity | Gets the identity of the symbol, made of the scope of its assembly and its documentation ID. |
| IsCompilerGenerated | Gets a value indicating whether the symbol is marked with System.Runtime.CompilerServices.CompilerGeneratedAttribute. |
| Kind | |
| MetadataName | Gets the name of the symbol as stored in metadata. |
| Name | Gets the name of the symbol. Types do not include the generic arity suffix (see PublicApiSymbol.MetadataName). Explicit interface implementations use their metadata name (e.g. System.IDisposable.Dispose), constructors are named .ctor. |
| Origin | Gets the metadata entity the symbol was read from, or null when the symbol is not backed by a single metadata entity. |
Accessibility
PublicApiSymbol.csAssembly
PublicApiSymbol.csAttributes
PublicApiSymbol.csGets all the custom attributes applied to the symbol, including the ones that are not displayed by the C# formatter.
public ImmutableArray<PublicApiAttribute> Attributes { get; }Property value
DeclaringType
PublicApiSymbol.csGets the type that declares the symbol. It is null for top-level types.
public PublicApiType? DeclaringType { get; }Property value
DocumentationId
PublicApiSymbol.csGets the XML documentation ID of the symbol, as generated by the C# compiler (e.g. M:System.String.Join(System.String,System.String[])). It matches the name attribute of the member elements of the XML documentation file.
public string DocumentationId { get; }Property value
Remarks
The documentation ID is not unique across assemblies. Use PublicApiSymbol.Identity to distinguish symbols of different assemblies.
Identity
PublicApiSymbol.csGets the identity of the symbol, made of the scope of its assembly and its documentation ID.
public PublicApiSymbolIdentity Identity { get; }Property value
IsCompilerGenerated
PublicApiSymbol.csKind
MetadataName
PublicApiSymbol.csGets the name of the symbol. Types do not include the generic arity suffix (see PublicApiSymbol.MetadataName). Explicit interface implementations use their metadata name (e.g. System.IDisposable.Dispose), constructors are named .ctor.
public string Name { get; }Property value
Origin
PublicApiSymbol.csGets the metadata entity the symbol was read from, or null when the symbol is not backed by a single metadata entity.
public PublicApiMetadataOrigin? Origin { get; }Property value
Methods
| Name | Description |
|---|---|
| ToString() |