private SyntaxList <MemberDeclarationSyntax> HookedProperties(int id) { SyntaxList <MemberDeclarationSyntax> outp = new SyntaxList <MemberDeclarationSyntax>(); PropertyWithValueListenerGen gen = new PropertyWithValueListenerGen(); // Add clr class instance id property if (shouldAddClrClassInstaceProp()) { outp = outp.Add(gen.GetCodeVineClrIdFieldSyntax()); } if (!shouldAddFieldHookProperties()) { return(outp); } var classInfo = cSfileInfo.GetClassInfo(id); foreach (var key in classInfo.FieldInfos.Keys) { var finfo = classInfo.FieldInfos[key]; // Todo - fix sending classInfo name directly to prop gen var newProp = gen.GenerateProperty(finfo, classInfo.Name); outp = outp.AddRange(newProp); } return(outp); }
public SyntaxNode Generate(ClassDeclarationSyntax node, int id) { if (cSfileInfo != null) { classInfo = cSfileInfo.GetClassInfo(id); } return(this.Visit(node)); }