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