22 references to Contains
Microsoft.CodeAnalysis.CSharp (7)
Compilation\MemberSemanticModel.cs (5)
227Debug.Assert(root.Contains(node)); 1661if (enclosingLambdaOrQuery == bindingRoot || !enclosingLambdaOrQuery.Contains(bindingRoot)) 1663Debug.Assert(bindingRoot.Contains(enclosingLambdaOrQuery)); 1878SyntaxNode result = startingNode.Contains(root) ? root : startingNode; 1879if (result != root && !root.Contains(result))
FlowAnalysis\DefiniteAssignment.cs (1)
2354if ((localSymbol as SourceLocalSymbol)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node.Syntax) == true)
FlowAnalysis\NullableWalker.cs (1)
3021if (local is SourceLocalSymbol { IsVar: true } && local.ForbiddenZone?.Contains(node.Syntax) == true)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (1)
34return containingLocalFunction.Contains(node);
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (2)
62=> declarationSyntax.IsKind(SyntaxKind.PropertyDeclaration) && declarationSyntax.Contains(node); 65=> declarationSyntax.GetAncestorsOrThis(n => n.IsKind(SyntaxKind.FieldDeclaration) && n.Contains(node)).Any();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
385&& nextToken.Parent.Contains(baseObjectCreationExpressionNode))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\OutVarTests.cs (2)
20954Assert.True(decl.Ancestors().OfType<VariableDeclaratorSyntax>().First().ArgumentList.Contains(decl)); 32757(declarator.ArgumentList?.Contains(decl)).GetValueOrDefault();
Semantics\PatternMatchingTestBase.cs (2)
293(declarator.ArgumentList?.Contains(designation)).GetValueOrDefault(); 350Assert.True(decl.Ancestors().OfType<VariableDeclaratorSyntax>().First().ArgumentList.Contains(decl));
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (1)
34return containingLocalFunction.Contains(node);
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
62=> declarationSyntax.IsKind(SyntaxKind.PropertyDeclaration) && declarationSyntax.Contains(node);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\SyntaxNodeTests.cs (2)
3847Assert.False(firstParens.Contains(a)); // fixing #8625 allows this to return quicker 3848Assert.True(firstParens.Contains(e));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3075if (previousToken != default && root.Contains(previousToken.Parent))
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1080if (whenNotNull.Contains(candidate.Syntax))
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxEditor.cs (1)
240if (OriginalRoot.Contains(node))