30 references to IndexOf
Microsoft.CodeAnalysis (2)
Syntax\SyntaxTriviaList.cs (2)
381var index = this.IndexOf(triviaInList); 412var index = this.IndexOf(triviaInList);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
713var lastDirectiveIndex = leadingTrivia.IndexOf(lastDirective);
Microsoft.CodeAnalysis.CSharp (3)
Syntax\SyntaxNodeRemover.cs (2)
489var index = parentToken.LeadingTrivia.IndexOf(trivia); 492: (parentToken.TrailingTrivia, parentToken.TrailingTrivia.IndexOf(trivia));
Syntax\SyntaxReplacer.cs (1)
507var index = list.IndexOf(_originalTrivia);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
87var triviaIndex = parentToken.LeadingTrivia.IndexOf(parentTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
264var numberOfLinesBeforeComment = GetNumberOfLines(triviaList.Take(triviaList.IndexOf(firstNonWhitespaceTrivia)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
83var lastIndex = triviaList.IndexOf(lastComment) + 1;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
599var splitIndex = closeBraceTrivia.IndexOf(lastEndIf) + 1;
Microsoft.CodeAnalysis.CSharp.Features (5)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
60var triviaIndex = triviaList.IndexOf(trivia);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
495nextStatement.WithLeadingTrivia(nextStatementLeading.Skip(nextStatementLeading.IndexOf(precedingEndOfLine) + 1)),
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
83var lastIndex = triviaList.IndexOf(lastComment) + 1;
Structure\Providers\DisabledTextTriviaStructureProvider.cs (2)
33var indexInParent = parentTriviaList.IndexOf(trivia); 41indexInParent = parentTriviaList.IndexOf(trivia);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Syntax\SyntaxTriviaListTests.cs (5)
65Assert.Equal(0, list.IndexOf(elementA)); 66Assert.Equal(1, list.IndexOf(elementB)); 67Assert.Equal(2, list.IndexOf(elementC)); 168Assert.Equal(-1, list.IndexOf(triviaD)); 215Assert.Equal(-1, list.IndexOf(triviaD));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\Worker.cs (1)
278var index = triviaList.IndexOf(trivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
87var triviaIndex = parentToken.LeadingTrivia.IndexOf(parentTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
264var numberOfLinesBeforeComment = GetNumberOfLines(triviaList.Take(triviaList.IndexOf(firstNonWhitespaceTrivia)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
599var splitIndex = closeBraceTrivia.IndexOf(lastEndIf) + 1;
Microsoft.CodeAnalysis.Features (2)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
147indexOfTriviaToRemove = triviaList.IndexOf(trivia);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
713var lastDirectiveIndex = leadingTrivia.IndexOf(lastDirective);
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\SyntaxNodeRemover.vb (2)
343Dim index = parentToken.LeadingTrivia.IndexOf(trivia) 346(parentToken.TrailingTrivia, parentToken.TrailingTrivia.IndexOf(trivia)))
Syntax\SyntaxReplacer.vb (1)
389Dim index = list.IndexOf(Me._originalTrivia)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\Worker.vb (1)
158Dim index = triviaList.IndexOf(trivia)