37 references to Finally
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Statements.cs (3)
3243var finallyBlockOpt = (node.Finally != null) ? BindEmbeddedBlock(node.Finally.Block, diagnostics) : null; 3399: (filter.Parent.Parent is TryStatementSyntax s && s.Catches.Count == 1 && s.Finally == null)
Binder\LocalBinderFactory.cs (2)
871if (node.Finally != null) 873Visit(node.Finally, _enclosing);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
136if (((TryStatementSyntax)node.Parent).Finally != null)
Syntax.xml.Main.Generated.cs (1)
1942=> node.Update(VisitList(node.AttributeLists), VisitToken(node.TryKeyword), (BlockSyntax?)Visit(node.Block) ?? throw new ArgumentNullException("block"), VisitList(node.Catches), (FinallyClauseSyntax?)Visit(node.Finally));
Syntax.xml.Syntax.Generated.cs (5)
9001if (attributeLists != this.AttributeLists || tryKeyword != this.TryKeyword || block != this.Block || catches != this.Catches || @finally != this.Finally) 9012public new TryStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.TryKeyword, this.Block, this.Catches, this.Finally); 9013public TryStatementSyntax WithTryKeyword(SyntaxToken tryKeyword) => Update(this.AttributeLists, tryKeyword, this.Block, this.Catches, this.Finally); 9014public TryStatementSyntax WithBlock(BlockSyntax block) => Update(this.AttributeLists, this.TryKeyword, block, this.Catches, this.Finally); 9015public TryStatementSyntax WithCatches(SyntaxList<CatchClauseSyntax> catches) => Update(this.AttributeLists, this.TryKeyword, this.Block, catches, this.Finally);
Syntax\LookupPosition.cs (1)
420FinallyClauseSyntax? finallyClause = tryStmt.Finally;
Microsoft.CodeAnalysis.CSharp.Features (12)
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
280if (tryStatement.Finally != null) 282AddLastStatementOfConstruct(tryStatement.Finally.Block);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (6)
2662return SyntaxFactory.AreEquivalent(oldTryStatement.Finally, newTryStatement.Finally) 2699RoslynDebug.Assert(tryStatement.Finally != null); 2700return tryStatement.Finally.Span; 2705(tryStatement.Finally != null) 2706? tryStatement.Finally.Span.End
Highlighting\KeywordHighlighters\TryStatementHighlighter.cs (2)
42if (tryStatement.Finally != null) 44highlights.Add(tryStatement.Finally.FinallyKeyword.Span);
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
39=> (tryStatement.Block.Statements, tryStatement.Finally?.Block.Statements ?? default);
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
80if (tryStatement.Finally?.Block is { IsMissing: false } finallyBlock)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Generated\Syntax.Test.xml.Generated.cs (2)
12891Assert.Null(node.Finally); 12892var newNode = node.WithAttributeLists(node.AttributeLists).WithTryKeyword(node.TryKeyword).WithBlock(node.Block).WithCatches(node.Catches).WithFinally(node.Finally);
Parsing\StatementParsingTests.cs (10)
1249Assert.Null(ts.Finally); 1278Assert.Null(ts.Finally); 1302Assert.Null(ts.Finally); 1345Assert.Null(ts.Finally); 1366Assert.NotNull(ts.Finally); 1367Assert.NotEqual(default, ts.Finally.FinallyKeyword); 1368Assert.NotNull(ts.Finally.Block); 1411Assert.NotNull(ts.Finally); 1412Assert.NotEqual(default, ts.Finally.FinallyKeyword); 1413Assert.NotNull(ts.Finally.Block);