Base:
property
InKeyword
Microsoft.CodeAnalysis.CSharp.Syntax.CommonForEachStatementSyntax.InKeyword
33 references to InKeyword
Microsoft.CodeAnalysis.CSharp (11)
Syntax.xml.Main.Generated.cs (1)
1894=> node.Update(VisitList(node.AttributeLists), VisitToken(node.AwaitKeyword), VisitToken(node.ForEachKeyword), VisitToken(node.OpenParenToken), (TypeSyntax?)Visit(node.Type) ?? throw new ArgumentNullException("type"), VisitToken(node.Identifier), VisitToken(node.InKeyword), (ExpressionSyntax?)Visit(node.Expression) ?? throw new ArgumentNullException("expression"), VisitToken(node.CloseParenToken), (StatementSyntax?)Visit(node.Statement) ?? throw new ArgumentNullException("statement"));
Syntax.xml.Syntax.Generated.cs (10)
7787if (attributeLists != this.AttributeLists || awaitKeyword != this.AwaitKeyword || forEachKeyword != this.ForEachKeyword || openParenToken != this.OpenParenToken || type != this.Type || identifier != this.Identifier || inKeyword != this.InKeyword || expression != this.Expression || closeParenToken != this.CloseParenToken || statement != this.Statement) 7798public new ForEachStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7800public new ForEachStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword) => Update(this.AttributeLists, awaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7802public new ForEachStatementSyntax WithForEachKeyword(SyntaxToken forEachKeyword) => Update(this.AttributeLists, this.AwaitKeyword, forEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7804public new ForEachStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, openParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7805public ForEachStatementSyntax WithType(TypeSyntax type) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7806public ForEachStatementSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7810public new ForEachStatementSyntax WithExpression(ExpressionSyntax expression) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, expression, this.CloseParenToken, this.Statement); 7812public new ForEachStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, closeParenToken, this.Statement); 7814public new ForEachStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, statement);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
125forEachStatement.InKeyword,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1250if (previousToken.HasValue && previousToken.Value != forEachStatementSyntax.InKeyword)
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
112inKeyword: forEachStatement.InKeyword.KeepCommentsAndAddElasticMarkers(), 172forEachStatement.OpenParenToken, forEachStatement.InKeyword, forEachStatement.CloseParenToken);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
328ForEachPart.In => node.InKeyword.Span,
src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
125forEachStatement.InKeyword,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (14)
Generated\Syntax.Test.xml.Generated.cs (2)
12667Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 12671var newNode = node.WithAttributeLists(node.AttributeLists).WithAwaitKeyword(node.AwaitKeyword).WithForEachKeyword(node.ForEachKeyword).WithOpenParenToken(node.OpenParenToken).WithType(node.Type).WithIdentifier(node.Identifier).WithInKeyword(node.InKeyword).WithExpression(node.Expression).WithCloseParenToken(node.CloseParenToken).WithStatement(node.Statement);
Parsing\StatementParsingTests.cs (12)
1938Assert.NotEqual(default, fs.InKeyword); 1939Assert.False(fs.InKeyword.IsMissing); 1940Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 1971Assert.NotEqual(default, fs.InKeyword); 1972Assert.False(fs.InKeyword.IsMissing); 1973Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 2002Assert.NotEqual(default, fs.InKeyword); 2003Assert.False(fs.InKeyword.IsMissing); 2004Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 3386Assert.NotEqual(default, fs.InKeyword); 3387Assert.False(fs.InKeyword.IsMissing); 3388Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1250if (previousToken.HasValue && previousToken.Value != forEachStatementSyntax.InKeyword)
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1250if (previousToken.HasValue && previousToken.Value != forEachStatementSyntax.InKeyword)