5 references to GetAncestorsOrThis
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\CSharpRenameRewriterLanguageService.cs (3)
161
var lambdas = node.
GetAncestorsOrThis
(n => n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax);
298
var expandParameter = !originalNode.
GetAncestorsOrThis
(n => n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax).Any();
1254
var nodeToSpeculate = node.
GetAncestorsOrThis
(n => SpeculationAnalyzer.CanSpeculateOnNode(n)).LastOrDefault();
Simplification\Reducers\CSharpEscapingReducer.cs (2)
55
var enclosingLambdaExpression = parent.
GetAncestorsOrThis
(n => (n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax)).FirstOrDefault();
75
var enclosingMethodBlock = parent.
GetAncestorsOrThis
(n => n is MethodDeclarationSyntax).FirstOrDefault();