118 references to First
Microsoft.AspNetCore.App.CodeFixes (1)
Kestrel\ListenOnIPv6AnyFixer.cs (1)
57var adjustedArgumentList = invocationExpressionSyntax.ArgumentList.RemoveNode(invocationExpressionSyntax.ArgumentList.Arguments.First(), SyntaxRemoveOptions.KeepLeadingTrivia);
Microsoft.CodeAnalysis.CSharp (2)
Binder\ForLoopBinder.cs (1)
105var scopeDesignator = incrementors.First();
Binder\LocalBinderFactory.cs (1)
631AddToMap(incrementors.First(), incrementorsBinder);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
80var variableDeclarator = localDeclarationStatement.Declaration.Variables.First();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
44return ((FieldDeclarationSyntax)member).Declaration.Variables.First().Identifier; 46return ((EventFieldDeclarationSyntax)member).Declaration.Variables.First().Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
89var variable = variableDeclaration.Variables.First();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
309var baseRecord = typeList.First();
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
79genericName.TypeArgumentList.Arguments.First(),
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
27var firstExpression = expressions.First();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
179x.Declaration.Variables.First().Identifier, 180y.Declaration.Variables.First().Identifier,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (4)
7498var value = declaration.Declaration.Variables.First().Initializer.Value; 7531var value = declaration.Declaration.Variables.First().Initializer.Value; 24206Assert.Equal("System.Int32 (System.Int32 elem1, System.Int32 elem2).elem1", model.GetDeclaredSymbol(type.Elements.First()).ToTestDisplayString()); 24208Assert.Equal("System.Int32 (System.Int32 elem1, System.Int32 elem2).elem1", model.GetDeclaredSymbol((SyntaxNode)type.Elements.First()).ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\CollectionExpressionTests.cs (3)
32401var element1 = collection.Elements.First(); 32443var element1 = collection.Elements.First(); 32488var element1 = collection.Elements.First();
Microsoft.CodeAnalysis.CSharp.Features (9)
EditAndContinue\BreakpointSpans.cs (2)
308switchArm = switchExpression.Arms.LastOrDefault(arm => position >= arm.FullSpan.Start) ?? switchExpression.Arms.First(); 407? TryCreateSpanForNode(orderByClause.Orderings.First().Expression, position)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
129declarations = new(((BaseFieldDeclarationSyntax)current).Declaration.Variables.First()); 271node = ((VariableDeclarationSyntax)node).Variables.First(); 275partnerStatement = ((VariableDeclarationSyntax)partnerStatement).Variables.First();
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
80var variableDeclarator = localDeclarationStatement.Declaration.Variables.First();
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
309var baseRecord = typeList.First();
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
79genericName.TypeArgumentList.Arguments.First(),
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
27var firstExpression = expressions.First();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\SuppressionTests.cs (1)
1096context.ReportDiagnostic(Diagnostic.Create(Descriptor, field.Declaration.Variables.First().Identifier.GetLocation()));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\UsingStatementTests.cs (2)
1378var firstDeclaredSymbol = model.GetDeclaredSymbol(usingStatement.Declaration.Variables.First()); 1389Assert.Equal(((ILocalSymbol)model.GetDeclaredSymbol(usingStatement.Declaration.Variables.First())).Type, typeInfo.Symbol);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (19)
Compilation\GetSemanticInfoTests.cs (1)
3586var argTypeInfo = model.GetTypeInfo(expr.ArgumentList.Arguments.First().Expression);
Compilation\SemanticModelAPITests.cs (10)
1411var varDecl = fieldDecl.Declaration.Variables.First(); 1786var declarator = localDecl.Declaration.Variables.First(); 1839var declarator = ((LocalDeclarationStatementSyntax)statement).Declaration.Variables.First(); 1852declarator = ((LocalDeclarationStatementSyntax)statement).Declaration.Variables.First(); 2268var declarator = unsafeStatement.Declaration.Variables.First(); 2392var declarator = localDecl.Declaration.Variables.First(); 2575var declarator = ((LocalDeclarationStatementSyntax)blockStatement.Statements[0]).Declaration.Variables.First(); 2589declarator = ((LocalDeclarationStatementSyntax)blockStatement.Statements[0]).Declaration.Variables.First(); 2603declarator = ((LocalDeclarationStatementSyntax)blockStatement.Statements[0]).Declaration.Variables.First(); 2873TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, methodDecl.ParameterList.Parameters.First().SpanStart,
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (6)
4275var constantInfo = speculativeModel.GetConstantValue(attr2.ArgumentList.Arguments.First().Expression); 4290constantInfo = speculativeModel.GetConstantValue(attr3.ArgumentList.Arguments.First().Expression); 4336constantInfo = speculativeModel.GetConstantValue(attr6.ArgumentList.Arguments.First().Expression); 4359constantInfo = speculativeModel.GetConstantValue(attr7.ArgumentList.Arguments.First().Expression); 4369var attr8 = SyntaxFactory.ParseCompilationUnit(@"[assembly: O(""hello"")]").AttributeLists.First().Attributes.First(); 4381constantInfo = speculativeModel.GetConstantValue(attr8.ArgumentList.Arguments.First().Expression);
Symbols\TypeTests.cs (2)
1764var loc = node1.Declaration.Variables.First(); 1765var sym = model.GetDeclaredSymbol(node1.Declaration.Variables.First()) as ILocalSymbol;
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
94var parameter = parenthesizedLambda.ParameterList.Parameters.First();
Simplification\Simplifiers\NameSimplifier.cs (1)
287var oldType = genericName.TypeArgumentList.Arguments.First();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
44return ((FieldDeclarationSyntax)member).Declaration.Variables.First().Identifier; 46return ((EventFieldDeclarationSyntax)member).Declaration.Variables.First().Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
89var variable = variableDeclaration.Variables.First();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
179x.Declaration.Variables.First().Identifier, 180y.Declaration.Variables.First().Identifier,
Microsoft.CodeAnalysis.VisualBasic (2)
Binding\Binder_Query.vb (1)
786Debug.Assert(Not skipFirstVariable OrElse source.Syntax Is variables.First)
Syntax\LambdaUtilities.vb (1)
571Return collectionRangeVariable IsNot GetCollectionRangeVariables(clause).First
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\StatementSyntaxExtensions.vb (2)
322Return DirectCast(member, FieldDeclarationSyntax).Declarators.First().Names.First().Identifier
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
891Return TextSpan.FromBounds(list.First.SpanStart, list.Last.Span.End)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (1)
86genericName.TypeArgumentList.Arguments.First(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeRefactorings\VisualBasicRefactoringHelpersService.vb (1)
96If localDeclarationStatement.Declarators.Count = 1 And localDeclarationStatement.Declarators.First().Names.Count = 1 Then
Microsoft.CodeAnalysis.VisualBasic.Features (26)
AddImport\VisualBasicAddImportFeatureService.vb (2)
264type = semanticModel.GetTypeInfo(fromClause.Variables.First().Expression, cancellationToken).Type 267type = semanticModel.GetTypeInfo(aggregateClause.Variables.First().Expression, cancellationToken).Type
CodeLens\VisualBasicDisplayInfoService.vb (2)
43Return GetDisplayNode(variableNode.Names.First()) 49Return GetDisplayNode(fieldNode.Declarators.First())
EditAndContinue\BreakpointSpans.vb (5)
100Return TextSpan.FromBounds(list.First.SpanStart, list.Last.Span.End) 340Return TryCreateSpanForNode(fromClause.Variables.First(), position) 362Return TryCreateSpanForNode(orderByClause.Orderings.First(), position) 409If position >= clause.Keys.First.SpanStart AndAlso position < clause.IntoKeyword.SpanStart Then 417Return TextSpan.FromBounds(clause.Keys.First.SpanStart, clause.Span.End)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
1165Return GetDiagnosticSpan(fieldDeclaration.Modifiers, fieldDeclaration.Declarators.First, fieldDeclaration.Declarators.Last)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (1)
86genericName.TypeArgumentList.Arguments.First(),
src\Compilers\VisualBasic\Portable\Syntax\LambdaUtilities.vb (14)
245Return selectClause.Variables.First.Expression 249Return aggregateClause.Variables.First.Expression 253Return groupByClause.Items.First.Expression 257Return groupByClause.Keys.First.Expression 261Return joinClause.JoinConditions.First.Left 265Return joinClause.JoinConditions.First.Right 334Dim firstCondition = DirectCast(node.Parent, JoinClauseSyntax).JoinConditions.First 410If lambda Is aggregateClause.Variables.First Then 440result.Add(clause.Variables.First.Expression) 459result.Add(joinClause.JoinedVariables.First.Expression) 546Return expressionRangeVariable Is selectClause.Variables.First 550Return expressionRangeVariable Is groupByClause.Keys.First OrElse 571Return collectionRangeVariable IsNot GetCollectionRangeVariables(clause).First 604Return joinCondition Is DirectCast(joinCondition.Parent, JoinClauseSyntax).JoinConditions.First
Structure\VisualBasicStructureHelpers.vb (1)
145Return If(fieldDeclaration.Modifiers.FirstOrNull(), fieldDeclaration.Declarators.First().GetFirstToken())
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (4)
Diagnostics\Suppression\SuppressionTests.vb (4)
1038context.ReportDiagnostic(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation())) 1754context.ReportDiagnostic(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (9)
Compilation\SemanticModelAPITests.vb (8)
1015Dim local = speculativeModel.GetDeclaredSymbol(speculatedStatement.Declarators.First().Names.First) 1823TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, inheritsClause.Types.First.Position, 1828TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, implementsClause.Types.First.Position, 1833Dim success = model.TryGetSpeculativeSemanticModel(inheritsClause.Types.First.Position, speculatedTypeExpression, speculativeModel, SpeculativeBindingOption.BindAsExpression) 1864TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, field.Declarators.First.AsClause.Type.Position, 1870TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, methodDecl.ParameterList.Parameters.First.AsClause.Type.Position, 1945Dim position = field.Declarators.First.AsClause.Type.Position
Semantics\MultiDimensionalTest.vb (1)
322Dim node = GetSyntaxNode(Of VariableDeclaratorSyntax)(compilation, SyntaxKind.VariableDeclarator, index).Names.First()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (8)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (1)
199Dim currentTypeArgument = genericName.TypeArgumentList.Arguments.First
OrganizeImports\VisualBasicOrganizeImportsService.Rewriter.vb (1)
79Return TextSpan.FromBounds(list.First().FullSpan.Start, list.Last().FullSpan.[End])
Rename\LocalConflictVisitor.vb (1)
148tokens.Add(DirectCast(controlVariable, VariableDeclaratorSyntax).Names.First().Identifier)
Simplification\Simplifiers\NameSimplifier.vb (1)
207Dim oldType = genericName.TypeArgumentList.Arguments.First()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\StatementSyntaxExtensions.vb (2)
322Return DirectCast(member, FieldDeclarationSyntax).Declarators.First().Names.First().Identifier
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
891Return TextSpan.FromBounds(list.First.SpanStart, list.Last.Span.End)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeRefactorings\VisualBasicRefactoringHelpersService.vb (1)
96If localDeclarationStatement.Declarators.Count = 1 And localDeclarationStatement.Declarators.First().Names.Count = 1 Then
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
421var declaredVariable = variables.First();
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SyntaxPathTests.cs (1)
61var path = new SyntaxPath(((InvocationExpressionSyntax)root).ArgumentList.Arguments.First().Expression);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
1750return fieldDeclaration.Declaration.Variables.First(); 3192? ((AttributeListSyntax)node).Attributes.First()
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (1)
1092startPosition = fieldDeclaration.Declarators.First().SpanStart
CodeModel\VisualBasicCodeModelService.vb (1)
3727DirectCast(node, AttributeListSyntax).Attributes.First,
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
71var argumentToValidate = arguments.First().Expression;