-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This 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 implementationAPI needs work before it is approved, it is NOT ready for implementation
Milestone
Description
Background and Motivation
After a compilation is emitted and the resulting image is loaded, we need to find a type in the loaded Assembly
that corresponds to a source INamedTypeSymbol
defined in the compilation.
Proposed API
namespace Microsoft.CodeAnalysis;
public class SymbolDisplayFormat
{
+ SymbolDisplayFormat MetadataDisplayFormat { get; }
}
Implemented like so:
Lines 60 to 61 in cf8b467
private static readonly SymbolDisplayFormat s_metadataDisplayFormat = | |
SymbolDisplayFormat.QualifiedNameArityFormat.AddCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UsePlusForNestedTypes); |
Usage Examples
var qualifiedTypeName = typeSymbol.ToDisplayString(SymbolDisplayFormat.MetadataDisplayFormat);
var type = Assembly.GetType(qualifiedTypeName);
Alternative Designs
Risks
Dreamescaper
Metadata
Metadata
Assignees
Labels
Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This 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 implementationAPI needs work before it is approved, it is NOT ready for implementation