Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        public static TypeOfExpressionSyntax TypeOfExpression(TypeSyntax type = null)
        {
            var result = new TypeOfExpressionSyntax();

            result.Type = type;

            return result;
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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;
        }
Esempio n. 5
0
        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;
        }
Esempio n. 6
0
        public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(ImplicitOrExplicit kind = default(ImplicitOrExplicit), TypeSyntax type = null)
        {
            var result = new ConversionOperatorDeclarationSyntax();

            result.Kind = kind;
            result.Type = type;

            return result;
        }
Esempio n. 7
0
        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;
        }
Esempio n. 8
0
        public static NullableTypeSyntax NullableType(TypeSyntax elementType = null)
        {
            var result = new NullableTypeSyntax();

            result.ElementType = elementType;

            return result;
        }
Esempio n. 9
0
        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;
        }
Esempio n. 10
0
        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;
        }
Esempio n. 11
0
        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;
        }
Esempio n. 12
0
        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;
        }
Esempio n. 13
0
        public static IndexerDeclarationSyntax IndexerDeclaration(TypeSyntax type = null)
        {
            var result = new IndexerDeclarationSyntax();

            result.Type = type;

            return result;
        }
Esempio n. 14
0
        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;
        }
Esempio n. 15
0
        public static CastExpressionSyntax CastExpression(TypeSyntax type = null, ExpressionSyntax expression = null)
        {
            var result = new CastExpressionSyntax();

            result.Type = type;
            result.Expression = expression;

            return result;
        }
Esempio n. 16
0
        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;
        }
Esempio n. 17
0
        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;
        }
Esempio n. 18
0
        public static OperatorDeclarationSyntax OperatorDeclaration(TypeSyntax returnType = null, Operator @operator = default(Operator))
        {
            var result = new OperatorDeclarationSyntax();

            result.ReturnType = returnType;
            result.Operator = @operator;

            return result;
        }
Esempio n. 19
0
        public static DefaultExpressionSyntax DefaultExpression(TypeSyntax type = null)
        {
            var result = new DefaultExpressionSyntax();

            result.Type = type;

            return result;
        }
Esempio n. 20
0
        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;
        }
Esempio n. 21
0
        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;
        }
Esempio n. 22
0
        public static TypeConstraintSyntax TypeConstraint(TypeSyntax type = null)
        {
            var result = new TypeConstraintSyntax();

            result.Type = type;

            return result;
        }
Esempio n. 23
0
        public static EventDeclarationSyntax EventDeclaration(TypeSyntax type = null, string identifier = null)
        {
            var result = new EventDeclarationSyntax();

            result.Type = type;
            result.Identifier = identifier;

            return result;
        }
Esempio n. 24
0
        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;
        }