23 references to IndexOf
Microsoft.CodeAnalysis (5)
Syntax\SeparatedSyntaxList.cs (3)
410int insertionIndex = index < this.Count ? nodesWithSeps.IndexOf(this[index]) : nodesWithSeps.Count; 486int index = nodesWithSeps.IndexOf(node); 572var index = nodesWithSeps.IndexOf(separatorToken);
Syntax\SyntaxNodeOrTokenList.cs (2)
386var index = this.IndexOf(nodeOrTokenInList); 417var index = this.IndexOf(nodeOrTokenInList);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
165var index = originalArgumentListChildren.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
337var index = list.GetWithSeparators().IndexOf(token);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
349var commaIndex = argsAndCommas.IndexOf(previousToken); 921var tokenIndex = argumentList.Arguments.GetWithSeparators().IndexOf(previousToken); 940var tokenIndex = attributeArgumentList.Arguments.GetWithSeparators().IndexOf(previousToken);
Microsoft.CodeAnalysis.CSharp.Features (2)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
85return (tupleExpr.Arguments.GetWithSeparators().IndexOf(context.TargetToken) + 1) / 2;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
165var index = originalArgumentListChildren.IndexOf(argument);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeOrTokenListTests.cs (1)
207Assert.Equal(-1, list.IndexOf(tokenD));
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1081var commaIndex = parameterList2.Parameters.GetWithSeparators().IndexOf(token); 1090var commaIndex = funcPtrParamList.Parameters.GetWithSeparators().IndexOf(token);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
337var index = list.GetWithSeparators().IndexOf(token);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
349var commaIndex = argsAndCommas.IndexOf(previousToken); 921var tokenIndex = argumentList.Arguments.GetWithSeparators().IndexOf(previousToken); 940var tokenIndex = attributeArgumentList.Arguments.GetWithSeparators().IndexOf(previousToken);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
205Dim commaIndex = argsAndCommas.IndexOf(previousToken) 1025Dim index = argumentList.Arguments.GetWithSeparators().IndexOf(previousToken)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
205Dim commaIndex = argsAndCommas.IndexOf(previousToken) 1025Dim index = argumentList.Arguments.GetWithSeparators().IndexOf(previousToken)