dotnet / dotnet/docs

Show real case scenario examples for many common cases in Roslyn APIs

Open
#35,924 0 comments 0 reactions 0 assignees View on GitHub
:watch: Not Triaged dotnet-roslyn-api/svc microsoft.codeanalysis/subsvc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

Inspired by lately finding out that `SymbolDisplay.ToDisplayString(ISymbol, SymbolDisplayFormat?)` displays an `INamespaceSymbol` representing the namespace "A.B.C.D" as `A.B.C.D`, not just its name which is `D`.

There are many more examples of docs that briefly describe the abstractions and how they are functioning, without clarifying the behavior in real and common scenarios, without having to have first experimented by manually running the theoretical code.

The common motivation for this is the confidence in writing that piece of code for the Roslyn components in applications, and not fearing that an API might not find suit, resulting in reinventing the wheel even for the most basic needs.

Below is the generated section for the initial docs page that inspired this.

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 3af8ea41-d247-a93d-0195-33c8f06ca7b5
* Version Independent ID: 5a952dfa-3b84-d850-d908-837b85448ec0
* Content: [SymbolDisplay.ToDisplayString Method (Microsoft.CodeAnalysis.CSharp)](https://learn.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.csharp.symboldisplay.todisplaystring?view=roslyn-dotnet-4.6.0)
* Content Source: [dotnet/xml/Microsoft.CodeAnalysis.CSharp/SymbolDisplay.xml](https://github.com/dotnet/roslyn-api-docs/blob/live/dotnet/xml/Microsoft.CodeAnalysis.CSharp/SymbolDisplay.xml)
* Product: **dotnet-roslyn-api**
* Technology: **microsoft.codeanalysis**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.