public static VariableDeclarationSyntax VariableDeclaration(TypeSyntax type = null, IEnumerable<VariableDeclaratorSyntax> variables = null) { var result = new VariableDeclarationSyntax(); result.Type = type; if (variables != null) result.Variables.AddRange(variables); return result; }
public static TypeOfExpressionSyntax TypeOfExpression(TypeSyntax type = null) { var result = new TypeOfExpressionSyntax(); result.Type = type; return result; }
public static ArrayTypeSyntax ArrayType(TypeSyntax elementType = null, IEnumerable<ArrayRankSpecifierSyntax> rankSpecifiers = null) { var result = new ArrayTypeSyntax(); result.ElementType = elementType; if (rankSpecifiers != null) result.RankSpecifiers.AddRange(rankSpecifiers); return result; }
public static EventDeclarationSyntax EventDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), TypeSyntax type = null, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier = null, string identifier = null, AccessorListSyntax accessorList = null) { var result = new EventDeclarationSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifiers = modifiers; result.Type = type; result.ExplicitInterfaceSpecifier = explicitInterfaceSpecifier; result.Identifier = identifier; result.AccessorList = accessorList; return result; }
public static FromClauseSyntax FromClause(TypeSyntax type = null, string identifier = null, ExpressionSyntax expression = null) { var result = new FromClauseSyntax(); result.Type = type; result.Identifier = identifier; result.Expression = expression; return result; }
public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(ImplicitOrExplicit kind = default(ImplicitOrExplicit), TypeSyntax type = null) { var result = new ConversionOperatorDeclarationSyntax(); result.Kind = kind; result.Type = type; return result; }
public static DelegateDeclarationSyntax DelegateDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), TypeSyntax returnType = null, string identifier = null, TypeParameterListSyntax typeParameterList = null, ParameterListSyntax parameterList = null, IEnumerable<TypeParameterConstraintClauseSyntax> constraintClauses = null) { var result = new DelegateDeclarationSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifiers = modifiers; result.ReturnType = returnType; result.Identifier = identifier; result.TypeParameterList = typeParameterList; result.ParameterList = parameterList; if (constraintClauses != null) result.ConstraintClauses.AddRange(constraintClauses); return result; }
public static NullableTypeSyntax NullableType(TypeSyntax elementType = null) { var result = new NullableTypeSyntax(); result.ElementType = elementType; return result; }
public static ObjectCreationExpressionSyntax ObjectCreationExpression(TypeSyntax type = null, ArgumentListSyntax argumentList = null, InitializerExpressionSyntax initializer = null) { var result = new ObjectCreationExpressionSyntax(); result.Type = type; result.ArgumentList = argumentList; result.Initializer = initializer; return result; }
public static MethodDeclarationSyntax MethodDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), TypeSyntax returnType = null, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier = null, string identifier = null, TypeParameterListSyntax typeParameterList = null, ParameterListSyntax parameterList = null, IEnumerable<TypeParameterConstraintClauseSyntax> constraintClauses = null, BlockSyntax body = null) { var result = new MethodDeclarationSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifiers = modifiers; result.ReturnType = returnType; result.ExplicitInterfaceSpecifier = explicitInterfaceSpecifier; result.Identifier = identifier; result.TypeParameterList = typeParameterList; result.ParameterList = parameterList; if (constraintClauses != null) result.ConstraintClauses.AddRange(constraintClauses); result.Body = body; return result; }
public static MethodDeclarationSyntax MethodDeclaration(TypeSyntax returnType = null, string identifier = null, ParameterListSyntax parameterList = null, BlockSyntax body = null) { var result = new MethodDeclarationSyntax(); result.ReturnType = returnType; result.Identifier = identifier; result.ParameterList = parameterList; result.Body = body; return result; }
public static JoinClauseSyntax JoinClause(TypeSyntax type = null, string identifier = null, ExpressionSyntax inExpression = null, ExpressionSyntax leftExpression = null, ExpressionSyntax rightExpression = null, JoinIntoClauseSyntax into = null) { var result = new JoinClauseSyntax(); result.Type = type; result.Identifier = identifier; result.InExpression = inExpression; result.LeftExpression = leftExpression; result.RightExpression = rightExpression; result.Into = into; return result; }
public static IndexerDeclarationSyntax IndexerDeclaration(TypeSyntax type = null) { var result = new IndexerDeclarationSyntax(); result.Type = type; return result; }
public static IndexerDeclarationSyntax IndexerDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), TypeSyntax type = null, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier = null, BracketedParameterListSyntax parameterList = null, AccessorListSyntax accessorList = null) { var result = new IndexerDeclarationSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifiers = modifiers; result.Type = type; result.ExplicitInterfaceSpecifier = explicitInterfaceSpecifier; result.ParameterList = parameterList; result.AccessorList = accessorList; return result; }
public static CastExpressionSyntax CastExpression(TypeSyntax type = null, ExpressionSyntax expression = null) { var result = new CastExpressionSyntax(); result.Type = type; result.Expression = expression; return result; }
public static OperatorDeclarationSyntax OperatorDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), TypeSyntax returnType = null, Operator @operator = default(Operator), ParameterListSyntax parameterList = null, BlockSyntax body = null) { var result = new OperatorDeclarationSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifiers = modifiers; result.ReturnType = returnType; result.Operator = @operator; result.ParameterList = parameterList; result.Body = body; return result; }
public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), ImplicitOrExplicit kind = default(ImplicitOrExplicit), TypeSyntax type = null, ParameterListSyntax parameterList = null, BlockSyntax body = null) { var result = new ConversionOperatorDeclarationSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifiers = modifiers; result.Kind = kind; result.Type = type; result.ParameterList = parameterList; result.Body = body; return result; }
public static OperatorDeclarationSyntax OperatorDeclaration(TypeSyntax returnType = null, Operator @operator = default(Operator)) { var result = new OperatorDeclarationSyntax(); result.ReturnType = returnType; result.Operator = @operator; return result; }
public static DefaultExpressionSyntax DefaultExpression(TypeSyntax type = null) { var result = new DefaultExpressionSyntax(); result.Type = type; return result; }
public static ParameterSyntax Parameter(IEnumerable<AttributeListSyntax> attributeLists = null, ParameterModifier modifier = default(ParameterModifier), TypeSyntax type = null, string identifier = null, EqualsValueClauseSyntax @default = null) { var result = new ParameterSyntax(); if (attributeLists != null) result.AttributeLists.AddRange(attributeLists); result.Modifier = modifier; result.Type = type; result.Identifier = identifier; result.Default = @default; return result; }
public static DelegateDeclarationSyntax DelegateDeclaration(TypeSyntax returnType = null, string identifier = null, ParameterListSyntax parameterList = null) { var result = new DelegateDeclarationSyntax(); result.ReturnType = returnType; result.Identifier = identifier; result.ParameterList = parameterList; return result; }
public static TypeConstraintSyntax TypeConstraint(TypeSyntax type = null) { var result = new TypeConstraintSyntax(); result.Type = type; return result; }
public static EventDeclarationSyntax EventDeclaration(TypeSyntax type = null, string identifier = null) { var result = new EventDeclarationSyntax(); result.Type = type; result.Identifier = identifier; return result; }
public static ForEachStatementSyntax ForEachStatement(TypeSyntax type = null, string identifier = null, ExpressionSyntax expression = null, StatementSyntax statement = null) { var result = new ForEachStatementSyntax(); result.Type = type; result.Identifier = identifier; result.Expression = expression; result.Statement = statement; return result; }