PublicApiSymbol Class

A type or a member that is part of the public API of an assembly.

public abstract class PublicApiSymbol

Remarks

Symbols only contain data decoded from metadata. They remain valid after the assembly file or stream is closed.

Properties

NameDescription
Accessibility
AssemblyGets the assembly that declares the symbol.
AttributesGets all the custom attributes applied to the symbol, including the ones that are not displayed by the C# formatter.
DeclaringTypeGets the type that declares the symbol. It is null for top-level types.
DocumentationIdGets 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.
IdentityGets the identity of the symbol, made of the scope of its assembly and its documentation ID.
IsCompilerGeneratedGets a value indicating whether the symbol is marked with System.Runtime.CompilerServices.CompilerGeneratedAttribute.
Kind
MetadataNameGets the name of the symbol as stored in metadata.
NameGets 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.
OriginGets the metadata entity the symbol was read from, or null when the symbol is not backed by a single metadata entity.

Accessibility

PublicApiSymbol.cs
public PublicApiAccessibility Accessibility { get; }

No documentation is available.

Gets the assembly that declares the symbol.

public PublicApiAssembly Assembly { get; }

Property value

PublicApiAssembly

Gets all the custom attributes applied to the symbol, including the ones that are not displayed by the C# formatter.

public ImmutableArray<PublicApiAttribute> Attributes { get; }

DeclaringType

PublicApiSymbol.cs

Gets the type that declares the symbol. It is null for top-level types.

public PublicApiType? DeclaringType { get; }

Property value

PublicApiType?

DocumentationId

PublicApiSymbol.cs

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.

public string DocumentationId { get; }

Property value

string

Remarks

The documentation ID is not unique across assemblies. Use PublicApiSymbol.Identity to distinguish symbols of different assemblies.

Gets the identity of the symbol, made of the scope of its assembly and its documentation ID.

public PublicApiSymbolIdentity Identity { get; }

IsCompilerGenerated

PublicApiSymbol.cs

Gets a value indicating whether the symbol is marked with System.Runtime.CompilerServices.CompilerGeneratedAttribute.

public bool IsCompilerGenerated { get; }

Property value

bool

Kind

public abstract PublicApiSymbolKind Kind { get; }

Property value

PublicApiSymbolKind

No documentation is available.

MetadataName

PublicApiSymbol.cs

Gets the name of the symbol as stored in metadata.

public virtual string MetadataName { get; }

Property value

string

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.

public string Name { get; }

Property value

string

Gets 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; }

Methods

NameDescription
ToString()
public override string ToString()

Returns

string

No documentation is available.