57 references to Incrementors
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Deconstruct.cs (1)
200return !loop.Incrementors.Contains(parent) && !loop.Initializers.Contains(parent);
Binder\Binder_Expressions.cs (1)
11415resultIsUsed = !loop.Incrementors.Contains(node) && !loop.Initializers.Contains(node);
Binder\ForLoopBinder.cs (1)
102SeparatedSyntaxList<ExpressionSyntax> incrementors = node.Incrementors;
Binder\LocalBinderFactory.cs (1)
626SeparatedSyntaxList<ExpressionSyntax> incrementors = node.Incrementors;
Compilation\MemberSemanticModel.cs (2)
402forStmt.Incrementors.Count > 0) 404binder = binder.GetBinder(forStmt.Incrementors.First());
Syntax.xml.Main.Generated.cs (1)
1891=> node.Update(VisitList(node.AttributeLists), VisitToken(node.ForKeyword), VisitToken(node.OpenParenToken), (VariableDeclarationSyntax?)Visit(node.Declaration), VisitList(node.Initializers), VisitToken(node.FirstSemicolonToken), (ExpressionSyntax?)Visit(node.Condition), VisitToken(node.SecondSemicolonToken), VisitList(node.Incrementors), VisitToken(node.CloseParenToken), (StatementSyntax?)Visit(node.Statement) ?? throw new ArgumentNullException("statement"));
Syntax.xml.Syntax.Generated.cs (12)
7647if (attributeLists != this.AttributeLists || forKeyword != this.ForKeyword || openParenToken != this.OpenParenToken || declaration != this.Declaration || initializers != this.Initializers || firstSemicolonToken != this.FirstSemicolonToken || condition != this.Condition || secondSemicolonToken != this.SecondSemicolonToken || incrementors != this.Incrementors || closeParenToken != this.CloseParenToken || statement != this.Statement) 7658public new ForStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7659public ForStatementSyntax WithForKeyword(SyntaxToken forKeyword) => Update(this.AttributeLists, forKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7660public ForStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.ForKeyword, openParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7661public ForStatementSyntax WithDeclaration(VariableDeclarationSyntax? declaration) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7662public ForStatementSyntax WithInitializers(SeparatedSyntaxList<ExpressionSyntax> initializers) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7663public ForStatementSyntax WithFirstSemicolonToken(SyntaxToken firstSemicolonToken) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, firstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7664public ForStatementSyntax WithCondition(ExpressionSyntax? condition) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7665public ForStatementSyntax WithSecondSemicolonToken(SyntaxToken secondSemicolonToken) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, secondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7667public ForStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, closeParenToken, this.Statement); 7668public ForStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, statement); 7673public ForStatementSyntax AddIncrementors(params ExpressionSyntax[] items) => WithIncrementors(this.Incrementors.AddRange(items));
Syntax\LambdaUtilities.cs (1)
450SeparatedSyntaxList<ExpressionSyntax> incrementors = ((ForStatementSyntax)node.Parent).Incrementors;
Syntax\SyntaxNodeExtensions.cs (1)
128return forStmt.Condition == expression || forStmt.Incrementors.FirstOrDefault() == expression;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
572&& forStatement.Incrementors.Count == 0;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (1)
53forStatement.Incrementors.Contains(currentAssignment))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\OutVarTests.cs (1)
1278forStatement.Incrementors.Span.Contains(decl.Position) &&
Microsoft.CodeAnalysis.CSharp.Features (15)
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (2)
52if (forStatement is { Declaration.Variables: [{ Initializer: not null } declarator], Condition.RawKind: (int)SyntaxKind.LessThanExpression, Incrementors.Count: 1 }) 65return TryGetStepValue(iterationVariable, forStatement.Incrementors[0], out stepValueExpressionOpt);
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
59node.Incrementors.Do(i => AddExpressionTerms(i, _expressions));
EditAndContinue\BreakpointSpans.cs (3)
649else if (forStatement.Incrementors.Count > 0) 652return CreateSpan(forStatement.Incrementors[0]); 964forStatement.Incrementors.Contains(expression);
EditAndContinue\SyntaxComparer.cs (2)
1182GetDescendantTokensIgnoringSeparators(left.Incrementors), GetDescendantTokensIgnoringSeparators(right.Incrementors));
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
244.WithIncrementors(VisitList(node.Incrementors))
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (3)
54forStatement.Incrementors.Count != 1) 60var after = forStatement.Incrementors[0]; 267var after = forStatement.Incrementors[0];
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
95var incrementor = forStatement.Incrementors.Single();
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (1)
53forStatement.Incrementors.Contains(currentAssignment))
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
450SeparatedSyntaxList<ExpressionSyntax> incrementors = ((ForStatementSyntax)node.Parent).Incrementors;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Generated\Syntax.Test.xml.Generated.cs (2)
12649Assert.Equal(default, node.Incrementors); 12652var newNode = node.WithAttributeLists(node.AttributeLists).WithForKeyword(node.ForKeyword).WithOpenParenToken(node.OpenParenToken).WithDeclaration(node.Declaration).WithInitializers(node.Initializers).WithFirstSemicolonToken(node.FirstSemicolonToken).WithCondition(node.Condition).WithSecondSemicolonToken(node.SecondSemicolonToken).WithIncrementors(node.Incrementors).WithCloseParenToken(node.CloseParenToken).WithStatement(node.Statement);
Parsing\StatementParsingTests.cs (14)
1535Assert.Equal(0, fs.Incrementors.Count); 1572Assert.Equal(0, fs.Incrementors.Count); 1611Assert.Equal(0, fs.Incrementors.Count); 1656Assert.Equal(0, fs.Incrementors.Count); 1749Assert.Equal(0, fs.Incrementors.Count); 1779Assert.Equal(0, fs.Incrementors.Count); 1809Assert.Equal(0, fs.Incrementors.Count); 1837Assert.Equal(1, fs.Incrementors.Count); 1838Assert.Equal("a++", fs.Incrementors[0].ToString()); 1867Assert.Equal(2, fs.Incrementors.Count); 1868Assert.Equal("a++", fs.Incrementors[0].ToString()); 1869Assert.Equal("b++", fs.Incrementors[1].ToString()); 1911Assert.Equal(1, fs.Incrementors.Count); 1912Assert.Equal("a++", fs.Incrementors[0].ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
572&& forStatement.Incrementors.Count == 0;
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
572&& forStatement.Incrementors.Count == 0;