22 references to LastOrDefault
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
160? block.Statements.LastOrDefault()
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\CompletionUtilities.cs (1)
208var firstAccessorStatement = (SyntaxNode)firstAccessor.Body?.Statements.LastOrDefault() ??
Debugging\CSharpProximityExpressionsService.Worker.cs (3)
180previousStatement = block.Statements.LastOrDefault(); 238AddLastStatementOfConstruct((statement as BlockSyntax).Statements.LastOrDefault()); 274AddLastStatementOfConstruct(section.Statements.LastOrDefault());
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
334if (documentationComment.Content.LastOrDefault() is not XmlTextSyntax xmlText)
GenerateType\CSharpGenerateTypeService.cs (1)
563var lastMember = compilationUnit.Members.LastOrDefault();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
160? block.Statements.LastOrDefault()
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
99Dim lastMember = TryCast(enumBlock.Members.LastOrDefault(), EnumMemberDeclarationSyntax)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\InitializeParameter\InitializeParameterHelpers.vb (1)
45Return GetStatements(blockStatementOpt.Syntax).LastOrDefault()
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
EndConstructGeneration\EndConstructStatementVisitor_IfStatement.vb (1)
71If statements.LastOrDefault().IsKind(SyntaxKind.EndIfStatement) Then
Microsoft.CodeAnalysis.VisualBasic.Features (9)
Completion\CompletionProviders\OverrideCompletionProvider.vb (2)
211Dim lastStatement = methodBlock.Statements.LastOrDefault() 221Dim lastAccessorStatement = firstAccessor.Statements.LastOrDefault()
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
204Dim xmlText = TryCast(documentationComment.Content.LastOrDefault(), XmlTextSyntax)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (3)
350lastBlockStatement = DirectCast(nodeOrToken.Parent, MultiLineIfBlockSyntax).Statements.LastOrDefault() 352lastBlockStatement = DirectCast(nodeOrToken.Parent, SingleLineIfStatementSyntax).Statements.LastOrDefault() 354lastBlockStatement = DirectCast(nodeOrToken.Parent, TryBlockSyntax).Statements.LastOrDefault()
GenerateType\VisualBasicGenerateTypeService.vb (1)
441Dim lastMember = compilationUnit.Members.LastOrDefault()
InvertIf\VisualBasicInvertIfCodeRefactoringProvider.SingleLine.vb (2)
57Dim lastTrue = trueStatements.LastOrDefault() 58Dim lastFalse = falseStatements.LastOrDefault()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
99Dim lastMember = TryCast(enumBlock.Members.LastOrDefault(), EnumMemberDeclarationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\InitializeParameter\InitializeParameterHelpers.vb (1)
45Return GetStatements(blockStatementOpt.Syntax).LastOrDefault()