Skip to content

[API Proposal]: SymbolDisplayFormat for fully-qualified metadata names and open generic types #74588

@alrz

Description

@alrz

Background and Motivation

The former already exists as QualifiedNameArityFormat but it's internal, useful while roundtripping names to GetTypeByMetadataName.

Currently there's no support for the latter which is useful to generate typeof expressions.

Proposed API

namespace Microsoft.CodeAnalysis;

public class SymbolDisplayFormat
{
    // eg: SomeNamespace.SomeType`1
    public static readonly SymbolDisplayFormat FullyQualifiedMetadataFormat;

    // eg: global::SomeNamespace.SomeType<>
    public static readonly SymbolDisplayFormat FullyQualifiedOpenGenericFormat;
}

Alternatively, both could be exposed as members of SymbolDisplayGenericsOptions.

Metadata

Metadata

Assignees

Labels

Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.Feature Requestapi-needs-workAPI needs work before it is approved, it is NOT ready for implementation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions