ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (14)
69if (_source.DescendantTrivia().Any(trivia => trivia is (kind:
73_source.ContainsDirectives))
93!_semanticModel.GetDiagnostics(_source.Span, _cancellationToken).Any(static diagnostic => diagnostic.DefaultSeverity == DiagnosticSeverity.Error))
127if (isLastClause && hasExtraDeclarations && !IsLocalOrParameterSymbol(_source.FromClause.Expression))
223var parent = _source.WalkUpParentheses().Parent;
249SyntaxNode currentNode = _source;
535var parentStatement = _source.GetAncestorOrThis<StatementSyntax>();
552var returnTypeInfo = _semanticModel.GetTypeInfo(_source, _cancellationToken);
578_source,
599var newParentExpressionStatement = parentStatement.ReplaceNode(_source.WalkUpParentheses(), localFunctionInvocation.WithAdditionalAnnotations(Simplifier.Annotation));
606var freeToken = _semanticFacts.GenerateUniqueName(_semanticModel, _source, container: null, baseName: prefix, _introducedLocalNames, _cancellationToken);
618if (forEachStatement.Expression.WalkDownParentheses() != _source)
786queryExpressionProcessingInfo = new QueryExpressionProcessingInfo(_source.FromClause);
787return TryProcessQueryBody(_source.Body, queryExpressionProcessingInfo);