Great Tool!!!
I think you can include aditional classes as "Walker" per Interface/Classes/Attributes.
This is an example of my Default Interface Generation:
var compilation = Project.Analysis.GetCompilationAsync().Result;
var walker = new ClassWithInterfaceWalker() { Interface = "AutoImplement" };
foreach (var st in compilation.SyntaxTrees) walker.Visit(st.GetRoot());
var classes = walker.Classes.Where(s => s.AttrArguments.Length > 0).OrderBy(s => s.AttrArguments[0]);
var macros = new Dictionary<string, MacroRoslyn>();
foreach(var a in classes)
{
var interf = a.GetStrippedArgument(0);
var classname = a.ClassName;
var fs = $"AutoImplement.{interf}.cs";
var fe = fs+"macro";
if (!macros.ContainsKey(interf))
{
var pathfe = System.IO.Path.Combine(, fe);
if (!File.Exists(fe))
{
throw new Exception($"Macro no encontrada: {fe}");
}
macros.Add(interf, new MacroRoslyn(File.ReadAllLines(pathfe)));
}
var macro = macros[interf];
macro.SetInstance(a.Class);
var macroresult = new StringBuilder();
macro.Execute(macroresult);
Output[fs].Write(macroresult.ToString());
}
Great Tool!!! I think you can include aditional classes as "Walker" per Interface/Classes/Attributes.
This is an example of my Default Interface Generation: