41 references to IndexOf
Microsoft.CodeAnalysis (1)
Syntax\SyntaxList`1.cs (1)
329var index = this.IndexOf(nodeInList);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (1)
84var fieldIndex = members.IndexOf(firstMember);
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
208var index = declarationList.IndexOf(afterMember); 224var index = declarationList.IndexOf(beforeMember); 253var index = declarationList.IndexOf(member); 270var index = declarationList.IndexOf(member);
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxReplacer.cs (1)
422var index = list.IndexOf((TNode)_originalNode);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
263var ifIndex = parentBlock.Statements.IndexOf(ifStatement);
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
359var expressionStatementIndex = block.Statements.IndexOf(expressionStatement);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
181for (var currentIndex = typeDeclaration.Members.IndexOf(constructorDeclaration) - 1; currentIndex >= 0; currentIndex--)
Microsoft.CodeAnalysis.CSharp.Features (4)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
554var index = statements.IndexOf((StatementSyntax)lastStatement);
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
263var ifIndex = parentBlock.Statements.IndexOf(ifStatement);
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
359var expressionStatementIndex = block.Statements.IndexOf(expressionStatement);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
181for (var currentIndex = typeDeclaration.Members.IndexOf(constructorDeclaration) - 1; currentIndex >= 0; currentIndex--)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxListTests.cs (1)
218Assert.Equal(-1, list.IndexOf(nodeD));
Microsoft.CodeAnalysis.Features (9)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (2)
122var declarationStatementIndex = surroundingStatements.IndexOf(declarationStatement); 251var declarationStatementIndex = surroundingStatements.IndexOf(declarationStatement);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (7)
385var firstIndex = statements.IndexOf(statementRange.FirstStatement); 386var lastIndex = statements.IndexOf(statementRange.LastStatement); 474var index = statements.IndexOf(ifNode); 517var index = statements.IndexOf(ifNode); 543var index = statements.IndexOf(ifNode); 567var index = statements.IndexOf(ifNode); 590var index = statements.IndexOf(ifNode);
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\SyntaxReplacer.vb (1)
324Dim index = list.IndexOf(DirectCast(Me._originalNode, TNode))
Microsoft.CodeAnalysis.VisualBasic.Features (5)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceQueryLocal.vb (1)
92Dim oldClauseIndex = oldClauses.IndexOf(oldClause)
SplitOrMergeIfStatements\VisualBasicIfLikeStatementGenerator.vb (4)
49Dim index = ifBlock.ElseIfBlocks.IndexOf(DirectCast(node, ElseIfBlockSyntax)) 67Dim index = ifBlock.ElseIfBlocks.IndexOf(DirectCast(ifOrElseIf, ElseIfBlockSyntax)) 104Dim nextElseIfBlocks = ifBlock.ElseIfBlocks.RemoveRange(0, ifBlock.ElseIfBlocks.IndexOf(elseIfBlock) + 1) 147Dim nextElseIfBlocks = ifBlock.ElseIfBlocks.RemoveRange(0, ifBlock.ElseIfBlocks.IndexOf(elseIfBlock) + 1)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Syntax\SyntaxListTests.vb (5)
28Assert.Equal(0, list.IndexOf(elementA)) 29Assert.Equal(1, list.IndexOf(elementB)) 30Assert.Equal(2, list.IndexOf(elementC)) 131Assert.Equal(-1, list.IndexOf(nodeD)) 178Assert.Equal(-1, list.IndexOf(nodeD))
Microsoft.CodeAnalysis.Workspaces (6)
SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
105return previousAccessors[currentAccessors.IndexOf(currentAccessor)];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (1)
84var fieldIndex = members.IndexOf(firstMember);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
208var index = declarationList.IndexOf(afterMember); 224var index = declarationList.IndexOf(beforeMember); 253var index = declarationList.IndexOf(member); 270var index = declarationList.IndexOf(member);