20 references to LastOrDefault
Microsoft.CodeAnalysis.CSharp.Features (7)
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
230var 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)
587var lastMember = compilationUnit.Members.LastOrDefault();
InitializeParameter\InitializeParameterHelpers.cs (1)
54? 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.EditorFeatures (1)
EndConstructGeneration\EndConstructStatementVisitor_IfStatement.vb (1)
72If statements.LastOrDefault().IsKind(SyntaxKind.EndIfStatement) Then
Microsoft.CodeAnalysis.VisualBasic.Features (10)
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)
447Dim lastMember = compilationUnit.Members.LastOrDefault()
InitializeParameter\InitializeParameterHelpers.vb (1)
44Return GetStatements(blockStatementOpt.Syntax).LastOrDefault()
InvertIf\VisualBasicInvertIfCodeRefactoringProvider.SingleLine.vb (2)
57Dim lastTrue = trueStatements.LastOrDefault() 58Dim lastFalse = falseStatements.LastOrDefault()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
99Dim lastMember = TryCast(enumBlock.Members.LastOrDefault(), EnumMemberDeclarationSyntax)