68 references to Identifier
Microsoft.CodeAnalysis.CSharp (15)
Binder\ForEachLoopBinder.cs (2)
92syntax.Identifier, 324ReportFieldContextualKeywordConflictIfAny(local, node, node.Identifier, diagnostics);
FlowAnalysis\NullableWalker.cs (1)
11890ForEachStatementSyntax statement => statement.Identifier.GetLocation(),
Lowering\Instrumentation\DebugInfoInjector.cs (1)
319iterationVarDeclSpan = TextSpan.FromBounds(forEachSyntax.Type.SpanStart, forEachSyntax.Identifier.Span.End);
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); 7808public new ForEachStatementSyntax WithInKeyword(SyntaxToken inKeyword) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, 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 (6)
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
106return forEachStatement.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUpdateExpressionSyntaxHelper.cs (1)
24identifier = foreachStatement.Identifier;
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
82forEachStatement.Identifier.GetLocation(), 130semanticModel, local, forEachStatement.Type, forEachStatement.Identifier, elementConversion,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
384var word = foreachStatement.Identifier.ValueText.ToCamelCase();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
107foreachStatement.Identifier, typeName, foreachStatement.Expression,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
39=> node.Identifier;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
117forEach.Identifier.GetRequiredParent(),
Microsoft.CodeAnalysis.CSharp.Features (28)
Completion\KeywordRecommenders\InKeywordRecommender.cs (1)
61if (token.Parent is ForEachStatementSyntax statement && token == statement.Identifier)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
128foreachStatement.Identifier, donotCastElement ? null : foreachInfo.ForEachElementType,
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (6)
108? forEachStatement.Identifier.WithPrependedLeadingTrivia( 111: forEachStatement.Identifier, 167forEachStatement.Identifier.WithPrependedLeadingTrivia( 191identifier.Identifier.ValueText == forEachStatement.Identifier.ValueText) 272var lambdaParameter = Parameter(Identifier(parentForEachStatement.Identifier.ValueText)); 275Identifier(parentForEachStatement.Identifier.ValueText)),
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (3)
43identifiersBuilder.Add(forEachStatement.Identifier); 101identifiersBuilder.Add(currentForEachStatement.Identifier); 238selectExpression: SyntaxFactory.IdentifierName(forEachInfo.ForEachStatement.Identifier),
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (4)
627if (forEachStatement.Identifier.ValueText != identifierName) 645if (!queryExpressionProcessingInfo.ContainsIdentifier(forEachStatement.Identifier)) 661forEachStatement.Identifier.ValueText == identifierName.Identifier.ValueText && 697forEachStatement.Identifier,
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
64_expressions.Add(node.Identifier.ValueText);
EditAndContinue\BreakpointSpans.cs (1)
678return CreateSpan(simpleForEachStatement.Type, simpleForEachStatement.Identifier);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
327ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.Type.SpanStart, node.Identifier.Span.End),
EditAndContinue\SyntaxComparer.cs (1)
1314GetLocalNames(((ForEachStatementSyntax)commonForEach).Identifier, ref result);
InlineHints\CSharpInlineTypeHintsService.cs (1)
67return CreateTypeHint(type, forEachStatement.Type, forEachStatement.Identifier);
Snippets\CSharpForEachLoopSnippetProvider.cs (2)
115arrayBuilder.Add(new SnippetPlaceholder(node.Identifier.ToString(), node.Identifier.SpanStart));
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
106return forEachStatement.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUpdateExpressionSyntaxHelper.cs (1)
24identifier = foreachStatement.Identifier;
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
82forEachStatement.Identifier.GetLocation(), 130semanticModel, local, forEachStatement.Type, forEachStatement.Identifier, elementConversion,
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
39=> node.Identifier;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
117forEach.Identifier.GetRequiredParent(),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
Generated\Syntax.Test.xml.Generated.cs (2)
12666Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.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 (8)
1936Assert.NotEqual(default, fs.Identifier); 1937Assert.Equal("a", fs.Identifier.ToString()); 1969Assert.NotEqual(default, fs.Identifier); 1970Assert.Equal("a", fs.Identifier.ToString()); 2000Assert.NotEqual(default, fs.Identifier); 2001Assert.Equal("a", fs.Identifier.ToString()); 3384Assert.NotEqual(default, fs.Identifier); 3385Assert.Equal("a", fs.Identifier.ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Classification\ClassificationHelpers.cs (1)
259else if (token.Parent is ForEachStatementSyntax forEachStatementSyntax && forEachStatementSyntax.Identifier == token)
Rename\LocalConflictVisitor.cs (2)
65_tracker.AddIdentifier(node.Identifier); 67_tracker.RemoveIdentifier(node.Identifier);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
384var word = foreachStatement.Identifier.ValueText.ToCamelCase();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
107foreachStatement.Identifier, typeName, foreachStatement.Expression,
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
384var word = foreachStatement.Identifier.ValueText.ToCamelCase();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
107foreachStatement.Identifier, typeName, foreachStatement.Expression,