Esempio n. 1
0
        public PropertyDeclarationSyntax ToSyntax()
        {
            var propertyDeclaration = PropertyDeclaration(Type.ToSyntax(), Identifier(Name))
                                      .WithModifiers(TokenList(Token(SyntaxKind.PublicKeyword)))
                                      .WithDocumentation(Description);

            return((GetterExpression == null)
                ? propertyDeclaration.WithAccessorList(AccessorList(List(GetAccessors())))
                : propertyDeclaration.WithExpressionBody(ArrowExpressionClause(GetterExpression.ToNewSyntax()))
                   .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)));
        }