|
@@ -1,14 +1,4 @@
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.ComponentModel;
|
|
|
-using System.Data;
|
|
|
-using System.Drawing;
|
|
|
-using System.IO;
|
|
|
-using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
-using System.Windows.Forms;
|
|
|
-using CodingCannon.Pages.Basic;
|
|
|
+using CodingCannon.Pages.Basic;
|
|
|
using Microsoft.CodeAnalysis.CSharp;
|
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
using ScintillaNET;
|
|
@@ -69,7 +59,6 @@ namespace CodingCannon.Pages
|
|
|
|| files.Length != 1) return;
|
|
|
var text = File.ReadAllText(files![0]);
|
|
|
|
|
|
-
|
|
|
var tree = CSharpSyntaxTree.ParseText(text);
|
|
|
|
|
|
var walker = new PropertyWalker();
|
|
@@ -82,10 +71,11 @@ namespace CodingCannon.Pages
|
|
|
};
|
|
|
}
|
|
|
|
|
|
- class PropertyWalker : CSharpSyntaxWalker
|
|
|
+ private class PropertyWalker : CSharpSyntaxWalker
|
|
|
{
|
|
|
private readonly List<string> _properties = new();
|
|
|
public IReadOnlyCollection<string> PropertyNames => _properties;
|
|
|
+
|
|
|
public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node)
|
|
|
{
|
|
|
_properties.Add(node.Identifier.Text);
|