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