94 references to IndexOf
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (2)
423var index = argumentList.Arguments.IndexOf(argument); 502var index = argumentList.Arguments.IndexOf(argument);
Microsoft.CodeAnalysis (3)
Syntax\SeparatedSyntaxList.cs (3)
243return this.IndexOf(node) >= 0; 520var index = this.IndexOf(nodeInList); 541var index = this.IndexOf(nodeInList);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
226method, argumentToAdd, arguments.IndexOf(argumentToAdd))); 388var newParameterIndex = isNamedArgument ? (int?)null : argumentList.IndexOf(argument);
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxReplacer.cs (1)
398var index = list.IndexOf((TNode)_originalNode);
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
74var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
952var index = tupleExpression.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (4)
622var argumentIndex = argumentList.Arguments.IndexOf(argument); 631var expressionIndex = initializer.Expressions.IndexOf(node); 657var argumentIndex = argumentList.Arguments.IndexOf(argument); 666var expressionIndex = initializer.Expressions.IndexOf(node);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442var index = argumentList.Arguments.IndexOf(argument);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (13)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
229var index = invocation.ArgumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1102parameterIndex = parameterList3.Parameters.IndexOf(parameter3); 1121parameterIndex = parameterList4.Parameters.IndexOf(parameter4);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (10)
279var index = initializer.ArgumentList.Arguments.IndexOf(argument); 285var index = invocation.ArgumentList.Arguments.IndexOf(argument); 296var index = creation.ArgumentList.Arguments.IndexOf(argument); 303var index = primaryConstructorBaseType.ArgumentList.Arguments.IndexOf(argument); 314var index = elementAccess.ArgumentList.Arguments.IndexOf(argument); 359var index = tupleExpression.Arguments.IndexOf(argument); 381var index = attribute.ArgumentList.Arguments.IndexOf(argument); 1309: initializerExpression.Expressions.IndexOf(expressionOpt); 1436: initializerExpression.Expressions.IndexOf(expressionOpt); 2075var armIndex = switchExpression.Arms.IndexOf(arm);
Microsoft.CodeAnalysis.CSharp.Features (4)
GenerateType\CSharpGenerateTypeService.cs (2)
66var parameterIndex = typeArgumentList.Arguments.IndexOf(typeSyntax); 104var index = constraintClause.Constraints.IndexOf(typeConstraint);
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
111? arguments.IndexOf(argument) == 1 // Positional argument "checkId"
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
229var index = invocation.ArgumentList.Arguments.IndexOf(argument);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SeparatedSyntaxListTests.cs (1)
266Assert.Equal(-1, list.IndexOf(nodeD));
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
74var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
952var index = tupleExpression.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (4)
622var argumentIndex = argumentList.Arguments.IndexOf(argument); 631var expressionIndex = initializer.Expressions.IndexOf(node); 657var argumentIndex = argumentList.Arguments.IndexOf(argument); 666var expressionIndex = initializer.Expressions.IndexOf(node);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1102parameterIndex = parameterList3.Parameters.IndexOf(parameter3); 1121parameterIndex = parameterList4.Parameters.IndexOf(parameter4);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (10)
279var index = initializer.ArgumentList.Arguments.IndexOf(argument); 285var index = invocation.ArgumentList.Arguments.IndexOf(argument); 296var index = creation.ArgumentList.Arguments.IndexOf(argument); 303var index = primaryConstructorBaseType.ArgumentList.Arguments.IndexOf(argument); 314var index = elementAccess.ArgumentList.Arguments.IndexOf(argument); 359var index = tupleExpression.Arguments.IndexOf(argument); 381var index = attribute.ArgumentList.Arguments.IndexOf(argument); 1309: initializerExpression.Expressions.IndexOf(expressionOpt); 1436: initializerExpression.Expressions.IndexOf(expressionOpt); 2075var armIndex = switchExpression.Arms.IndexOf(arm);
Microsoft.CodeAnalysis.Features (4)
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
257var placeholderIndex = arguments.IndexOf(placeholderArgument);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
226method, argumentToAdd, arguments.IndexOf(argumentToAdd))); 388var newParameterIndex = isNamedArgument ? (int?)null : argumentList.IndexOf(argument);
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
77var argumentIndex = arguments.IndexOf(argument);
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\SyntaxReplacer.vb (1)
307Dim index = list.IndexOf(DirectCast(Me._originalNode, TNode))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
59Dim index = argumentList.Arguments.IndexOf(argument)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
294Dim index = argumentList.Arguments.IndexOf(simpleArgument)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
242Dim index = argumentList.Arguments.IndexOf(argument)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (5)
215Dim index = tupleExpression.Arguments.IndexOf(argument) 240index = invocation.ArgumentList.Arguments.IndexOf(argumentOpt) 300index = creation.ArgumentList.Arguments.IndexOf(argumentOpt) 324index = attribute.ArgumentList.Arguments.IndexOf(argumentOpt) 1046Dim parameterIndex = collectionInitializer.Initializers.IndexOf(expression)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
EditAndContinue\BreakpointSpans.vb (1)
384If query.Clauses.First() IsNot fromClause OrElse fromClause.Variables.IndexOf(collectionRangeVariable) <> 0 Then
ExtractMethod\Extensions.vb (1)
134Dim argumentIndex = invocation.ArgumentList.Arguments.IndexOf(argument)
GenerateType\VisualBasicGenerateTypeService.vb (1)
61Dim index = constraintClause.Constraints.IndexOf(typeConstraint)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Syntax\SeparatedSyntaxListTests.vb (5)
34Assert.Equal(0, list.IndexOf(elementA)) 35Assert.Equal(1, list.IndexOf(elementB)) 36Assert.Equal(2, list.IndexOf(elementC)) 137Assert.Equal(-1, list.IndexOf(nodeD)) 184Assert.Equal(-1, list.IndexOf(nodeD))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
59Dim index = argumentList.Arguments.IndexOf(argument)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
294Dim index = argumentList.Arguments.IndexOf(simpleArgument)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
242Dim index = argumentList.Arguments.IndexOf(argument)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (5)
215Dim index = tupleExpression.Arguments.IndexOf(argument) 240index = invocation.ArgumentList.Arguments.IndexOf(argumentOpt) 300index = creation.ArgumentList.Arguments.IndexOf(argumentOpt) 324index = attribute.ArgumentList.Arguments.IndexOf(argumentOpt) 1046Dim parameterIndex = collectionInitializer.Initializers.IndexOf(expression)
Microsoft.CodeAnalysis.Workspaces (1)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
93var ordinalInInvocation = arguments.IndexOf(lambdaSyntax.Parent);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
1665index = attribute.ArgumentList!.Arguments.IndexOf((AttributeArgumentSyntax)attributeArgumentNode); 2777var memberIndex = members.IndexOf(node); 3087var indexOfAttributeInDeclaration = attributeDeclaration.Attributes.IndexOf(attribute); 3160var indexOfDeclaratorInField = variableDeclaration.Variables.IndexOf(variableDeclarator);
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
CodeModel\VisualBasicCodeModelService.vb (6)
1601Dim indexOfAttributeInBlock = attributeBlock.Attributes.IndexOf(attribute) 1642Dim indexOfImportClauseInStatement = importsStatement.ImportsClauses.IndexOf(importsClause) 1682Dim indexOfNameInDeclarator = variableDeclarator.Names.IndexOf(modifiedIdentifier) 1683Dim indexOfDeclaratorInField = fieldDeclaration.Declarators.IndexOf(variableDeclarator) 1868index = attribute.ArgumentList.Arguments.IndexOf(DirectCast(attributeArgumentNode, ArgumentSyntax)) 4131Dim index = methodStatement.HandlesClause.Events.IndexOf(clauseItemToRemove)