Skip to content

Instantly share code, notes, and snippets.

View Youssef1313's full-sized avatar

Youssef Victor Youssef1313

View GitHub Profile
docs/core/deploying/snippets/deploy-with-vs/vb/deployment-example.vb
docs/core/tutorials/snippets/library-with-visual-studio/csharp/ShowCase/Program.cs
docs/core/tutorials/snippets/library-with-visual-studio/vb/ShowCase/Program.vb
docs/core/tutorials/snippets/with-visual-studio/vb/Program.vb
docs/core/whats-new/snippets/dotnet-core-2-1/csharp/brotli.cs
docs/csharp/language-reference/attributes/snippets/ConditionalExamples.cs
docs/csharp/language-reference/attributes/snippets/NewPropertyOrFieldAttribute.cs
docs/csharp/language-reference/attributes/snippets/ObsoleteExample.cs
docs/csharp/language-reference/attributes/snippets/trace.cs
docs/csharp/language-reference/builtin-types/snippets/BoolType.cs
@Youssef1313
Youssef1313 / Program.cs
Created February 24, 2021 17:58
Roslyn
using System;
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace ConsoleApp24
{
public class Visitor : SymbolVisitor
{
// TODO: Pooling
internal StringBuilder Builder { get; } = new();
private readonly bool _includeGlobalNamespace;
private void AppendName(string text)
{
if (SyntaxFacts.GetKeywordKind(text) != SyntaxKind.None)
{