public override ClassDeclarationSyntax EmitSyntax() { OutputSyntax = SyntaxFactory.ClassDeclaration(Member.Name.ToPascalCase()); if (Member.Attributes.Count > 0) { OutputSyntax = OutputSyntax.WithAttributeLists(EmitAttributeLists()); } OutputSyntax = OutputSyntax.WithModifiers(EmitMemberModifiers()); if (Member.BaseType != null || Member.Interfaces.Count > 0) { OutputSyntax = OutputSyntax.WithBaseList(EmitBaseList()); } if (Member.IsGenericDefinition && Member.GenericParameters.Count > 0) { OutputSyntax = OutputSyntax.WithTypeParameterList(EmitTypeParameterList()); } OutputSyntax = OutputSyntax.WithMembers(EmitMembers()); return(OutputSyntax); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public override EnumDeclarationSyntax EmitSyntax() { OutputSyntax = SyntaxFactory.EnumDeclaration(Member.Name); if (Member.Attributes.Count > 0) { OutputSyntax = OutputSyntax.WithAttributeLists(EmitAttributeLists()); } OutputSyntax = OutputSyntax.WithModifiers(EmitMemberModifiers()); OutputSyntax = OutputSyntax.WithMembers(EmitEnumMembers()); return(OutputSyntax); }