26 references to FirstOrDefault
Microsoft.AspNetCore.App.Analyzers (1)
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
54var ipAddressArgumentSyntax = args.Arguments.FirstOrDefault();
Microsoft.CodeAnalysis.CSharp (1)
Syntax\LambdaUtilities.cs (1)
449if (incrementors.FirstOrDefault() == node)
Microsoft.CodeAnalysis.CSharp.Features (7)
ChangeSignature\CSharpChangeSignatureService.cs (1)
392var doNotSkipParameterType = parenLambda.ParameterList.Parameters.FirstOrDefault()?.Type != null;
CodeLens\CSharpCodeLensDisplayInfoService.cs (2)
42node = localDeclarationNode.Declaration.Variables.FirstOrDefault(); 49node = fieldNode.Declaration.Variables.FirstOrDefault();
EditAndContinue\BreakpointSpans.cs (1)
635var firstVariable = forStatement.Declaration.Variables.FirstOrDefault();
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
57: directive.ErrorCodes.FirstOrDefault(),
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
113if (typeDeclaration.BaseList?.Types.FirstOrDefault() is PrimaryConstructorBaseTypeSyntax initializer)
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
449if (incrementors.FirstOrDefault() == node)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\ClassificationHelpers.cs (1)
332=> methodDeclaration.ParameterList.Parameters.FirstOrDefault()?.Modifiers.Any(SyntaxKind.ThisKeyword) == true;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
182Dim type = collectionInitializer.Initializers.FirstOrDefault().DetermineType(semanticModel, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicDeclarationComparer.vb (4)
180x.Declarators.FirstOrDefault().Names.FirstOrDefault().Identifier, 181y.Declarators.FirstOrDefault().Names.FirstOrDefault().Identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContext.vb (1)
220If fromClause.Variables.FirstOrDefault() Is collectionRange AndAlso queryExpression.Clauses.FirstOrDefault() Is collectionRange.Parent Then
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Compilers\VisualBasic\Portable\Syntax\LambdaUtilities.vb (1)
551expressionRangeVariable Is groupByClause.Items.FirstOrDefault
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
182Dim type = collectionInitializer.Initializers.FirstOrDefault().DetermineType(semanticModel, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicDeclarationComparer.vb (4)
180x.Declarators.FirstOrDefault().Names.FirstOrDefault().Identifier, 181y.Declarators.FirstOrDefault().Names.FirstOrDefault().Identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContext.vb (1)
220If fromClause.Variables.FirstOrDefault() Is collectionRange AndAlso queryExpression.Clauses.FirstOrDefault() Is collectionRange.Parent Then
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
CodeModel\VisualBasicCodeModelService.vb (2)
3094Dim firstParameter = accessorBlock.BlockStatement.ParameterList.Parameters.FirstOrDefault() 3358Dim firstParameter = accessorBlock.BlockStatement.ParameterList.Parameters.FirstOrDefault()
Help\VisualBasicHelpContextService.Visitor.vb (1)
814bestName = node.Names.FirstOrDefault()