public override PropertyDeclarationSyntax EmitSyntax() { OutputSyntax = SyntaxFactory.PropertyDeclaration( Member.PropertyType.GetTypeNameSyntax(), SyntaxFactory.Identifier(Member.Name) ); OutputSyntax = OutputSyntax.WithModifiers(EmitMemberModifiers()); OutputSyntax = OutputSyntax.WithAccessorList( SyntaxFactory.AccessorList( SyntaxFactory.List <AccessorDeclarationSyntax>(new[] { SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration) .WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)), SyntaxFactory.AccessorDeclaration(SyntaxKind.SetAccessorDeclaration) .WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)) }) ) ); return(OutputSyntax); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public override PropertyDeclarationSyntax EmitSyntax() { OutputSyntax = PropertyDeclaration( Member.PropertyType.GetTypeNameSyntax(), Identifier(Member.Name) ); OutputSyntax = OutputSyntax.WithModifiers(EmitMemberModifiers()); OutputSyntax = OutputSyntax.WithAccessorList( AccessorList( SingletonList <AccessorDeclarationSyntax>( AccessorDeclaration( SyntaxKind.GetAccessorDeclaration ) .WithSemicolonToken( Token(SyntaxKind.SemicolonToken) ) ) ) ); return(OutputSyntax); }