add: Registry
This commit is contained in:
18
ClassSyntaxReceiver.cs
Normal file
18
ClassSyntaxReceiver.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
namespace Hangman.SDK.Generators;
|
||||
|
||||
public class ClassSyntaxReceiver : ISyntaxReceiver
|
||||
{
|
||||
public List<ClassDeclarationSyntax> Classes { get; set; } = new ();
|
||||
|
||||
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
|
||||
{
|
||||
if (syntaxNode is ClassDeclarationSyntax classDeclaration)
|
||||
{
|
||||
Classes.Add(classDeclaration);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user