11 references to IndexOf
Microsoft.CodeAnalysis.CSharp (2)
CSharpExtensions.cs (2)
157
return list.
IndexOf
(kind) >= 0;
162
int index = list.
IndexOf
(kind);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
35
var asyncTokenIndex = modifiers.
IndexOf
(SyntaxKind.AsyncKeyword);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
35
var asyncTokenIndex = modifiers.
IndexOf
(SyntaxKind.AsyncKeyword);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxTokenListTests.cs (4)
249
Assert.Equal(0, list.
IndexOf
(SyntaxKind.SizeOfKeyword));
252
Assert.Equal(1, list.
IndexOf
(SyntaxKind.StringLiteralToken));
255
Assert.Equal(2, list.
IndexOf
(SyntaxKind.DotToken));
258
Assert.Equal(-1, list.
IndexOf
(SyntaxKind.NullKeyword));
Microsoft.Interop.SourceGeneration (3)
SyntaxExtensions.cs (3)
100
if (modifiers.
IndexOf
(modifierToAdd) >= 0)
106
int idxPartial = modifiers.
IndexOf
(SyntaxKind.PartialKeyword);
107
int idxRef = modifiers.
IndexOf
(SyntaxKind.RefKeyword);