Comments (2)
API Review
- Rather than exposing a new
MetadataDisplayFormat
, can we just exposeUsePlusForNestedTypes
option? - Let users then create the format they need
- What part of metadata format does this cover? Is it class declaration? Is it call syntax with substituted generic types?
- If we want to have a premade format for this scenario, we should be very precise as to what is supported and what is not.
Conclusion: Needs work. Exposing a UsePlusForNestedTypes
option seems reasonable by itself. A format would then need to be very precise as to what it supports and where.
from roslyn.
My bad, I didn't notice that s_metadataDisplayFormat
is only used by tests and is not the full implementation of fully qualified name.
The intention was to allow the code written in the usage example - that is, given a ITypeSymbol
return a fully qualified metadata name in the format that System.Reflection parses to load a type. See https://github.com/dotnet/runtime/blob/main/src/libraries/Common/src/System/Reflection/TypeNameParser.cs.
This format is also used in ECMA-335 when serializing the value of System.Type for custom attribute blob. This is implemented by the compiler here: https://github.com/dotnet/roslyn/blob/main/src/Compilers/Core/Portable/PEWriter/TypeNameSerializer.cs
Examples:
typeof(X<int*[]>.Y<string>[,,]))
X`1+Y`1[[System.Int32*[], System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]][,,]
typeof(X<>.Y<>)
X`1+Y`1
from roslyn.
Related Issues (20)
- Reporting Roslyn analyzer name is inaccessible through Error list entry in VSSDK for VisualStudio 2022 17.10
- Programación HOT 2
- IDE0036 not raised for `protected private` and `internal protected` members HOT 1
- Visual Studio 2022 adds a duplicate "Option Strict On" to Code File When Pasting VB.NET Code HOT 1
- Account for partial properties at existing use sites of partial method symbol APIs HOT 3
- Change Workspace.Option setter to throw NotSupportedException HOT 1
- Version conflict detected for Microsoft.CodeAnalysis.Common Microsoft.CodeAnalysis.CSharp HOT 2
- Adding documents to a VisualStudioWorkspace in a subfolder fails if folder doesn't exist HOT 7
- IDE0100 (Remove unnecessary equality operator) catches `x == false` as redundant HOT 9
- csc.exe hangs on specific file
- Filesystem pollution in `/tmp/` HOT 4
- Adding/Removing space when toggling line comments HOT 2
- Methods with Optional String Parameters Won't Collapse HOT 1
- Method defining line move when adding code before method declaration HOT 1
- Error list goes crazy while doing a refactoring HOT 1
- Version 17.10.0 Preview 5.0 - Error list not showing all warnings HOT 1
- VS 17.10.0 preview 4 shows warnings where no Error is. HOT 1
- C# Syntax highlighting of type references is broken HOT 7
- Custom modifiers are not copied in array type collection expression lowering
- Accessibility issue in document outline window. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roslyn.