Exemplo n.º 1
0
        public static EventFieldDeclarationSyntax EventFieldDeclaration(VariableDeclarationSyntax declaration = null)
        {
            var result = new EventFieldDeclarationSyntax();

            result.Declaration = declaration;

            return result;
        }
Exemplo n.º 2
0
 public virtual void VisitVariableDeclaration(VariableDeclarationSyntax node)
 {
     DefaultVisit(node);
 }
Exemplo n.º 3
0
        public static VariableDeclarationSyntax VariableDeclaration(string type = null, IEnumerable<VariableDeclaratorSyntax> variables = null)
        {
            var result = new VariableDeclarationSyntax();

            if (type != null)
                result.Type = ParseName(type);
            if (variables != null)
                result.Variables.AddRange(variables);

            return result;
        }
Exemplo n.º 4
0
        public static EventFieldDeclarationSyntax EventFieldDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), VariableDeclarationSyntax declaration = null)
        {
            var result = new EventFieldDeclarationSyntax();

            if (attributeLists != null)
                result.AttributeLists.AddRange(attributeLists);
            result.Modifiers = modifiers;
            result.Declaration = declaration;

            return result;
        }
Exemplo n.º 5
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;
        }
Exemplo n.º 6
0
        public static UsingStatementSyntax UsingStatement(VariableDeclarationSyntax declaration = null, ExpressionSyntax expression = null, StatementSyntax statement = null)
        {
            var result = new UsingStatementSyntax();

            result.Declaration = declaration;
            result.Expression = expression;
            result.Statement = statement;

            return result;
        }
Exemplo n.º 7
0
        public static LocalDeclarationStatementSyntax LocalDeclarationStatement(VariableDeclarationSyntax declaration = null)
        {
            var result = new LocalDeclarationStatementSyntax();

            result.Declaration = declaration;

            return result;
        }
Exemplo n.º 8
0
        public static LocalDeclarationStatementSyntax LocalDeclarationStatement(Modifiers modifiers = default(Modifiers), VariableDeclarationSyntax declaration = null)
        {
            var result = new LocalDeclarationStatementSyntax();

            result.Modifiers = modifiers;
            result.Declaration = declaration;

            return result;
        }
Exemplo n.º 9
0
        public static ForStatementSyntax ForStatement(VariableDeclarationSyntax declaration = null, IEnumerable<ExpressionSyntax> initializers = null, ExpressionSyntax condition = null, IEnumerable<ExpressionSyntax> incrementors = null, StatementSyntax statement = null)
        {
            var result = new ForStatementSyntax();

            result.Declaration = declaration;
            if (initializers != null)
                result.Initializers.AddRange(initializers);
            result.Condition = condition;
            if (incrementors != null)
                result.Incrementors.AddRange(incrementors);
            result.Statement = statement;

            return result;
        }