25 references to ForEachInfo
Microsoft.CodeAnalysis.CSharp.Features (25)
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (9)
59CreateFromClause(ForEachInfo.ForEachStatement, ForEachInfo.LeadingTokens.GetTrivia(), []), 61[.. ForEachInfo.ConvertingExtendedNodes.Select(node => CreateQueryClause(node))], 63.WithCommentsFrom(leadingTokensForSelect, ForEachInfo.TrailingTokens.Concat(trailingTokensForSelect)), 127var foreachStatement = ForEachInfo.ForEachStatement; 128selectExpression = selectExpression.WithCommentsFrom(leadingTokensForSelect, ForEachInfo.TrailingTokens.Concat(trailingTokensForSelect)); 135leadingCommentsTrivia: ForEachInfo.LeadingTokens.GetTrivia(), 228if (extendedNodeIndex == ForEachInfo.ConvertingExtendedNodes.Length) 234var node = ForEachInfo.ConvertingExtendedNodes[extendedNodeIndex];
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (8)
51var previous = ForEachInfo.ForEachStatement.GetPreviousStatement(); 81ForEachInfo.SemanticModel.GetSymbolInfo(assignmentExpression.Left, cancellationToken).Symbol, 82ForEachInfo.SemanticModel.GetSymbolInfo(_modifyingExpression, cancellationToken).Symbol) && 96ForEachInfo.ForEachStatement, 106var expresisonSymbol = ForEachInfo.SemanticModel.GetSymbolInfo(_modifyingExpression, cancellationToken).Symbol; 108ForEachInfo.ForEachStatement.GetNextStatement() is ReturnStatementSyntax returnStatement && 111expresisonSymbol, ForEachInfo.SemanticModel.GetSymbolInfo(returnStatement.Expression, cancellationToken).Symbol)) 138editor.RemoveNode(ForEachInfo.ForEachStatement);
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (5)
28var variableNamesReadInside = new HashSet<string>(ForEachInfo.Statements 29.SelectMany(statement => ForEachInfo.SemanticModel.AnalyzeDataFlow(statement).ReadInside).Select(symbol => symbol.Name)); 30var identifiersUsedInStatements = ForEachInfo.Identifiers 36ForEachInfo.Statements.SelectAsArray(statement => statement.KeepCommentsAndAddElasticMarkers())); 39ForEachInfo.ForEachStatement,
ConvertLinq\ConvertForEachToLinqQuery\ToToListConverter.cs (2)
31ForEachInfo.SemanticModel.GetSymbolInfo(objectCreationExpression.Type, cancellationToken).Symbol is ITypeSymbol typeSymbol && 32CSharpConvertForEachToLinqQueryProvider.TypeSymbolIsList(typeSymbol, ForEachInfo.SemanticModel) &&
ConvertLinq\ConvertForEachToLinqQuery\YieldReturnConverter.cs (1)
37ForEachInfo.ForEachStatement,