41 references to Block
Microsoft.CodeAnalysis.CSharp (14)
Binder\Binder_Statements.cs (1)
3241
var tryBlock = BindEmbeddedBlock(node.
Block
, diagnostics);
Binder\LocalBinderFactory.cs (2)
859
Visit(node.
Block
, _enclosing.WithAdditionalFlags(BinderFlags.InTryBlockOfTryCatch));
863
Visit(node.
Block
, _enclosing);
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 (9)
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);
9015
public TryStatementSyntax WithCatches(SyntaxList<CatchClauseSyntax> catches) => Update(this.AttributeLists, this.TryKeyword, this.
Block
, catches, this.Finally);
9016
public TryStatementSyntax WithFinally(FinallyClauseSyntax? @finally) => Update(this.AttributeLists, this.TryKeyword, this.
Block
, this.Catches, @finally);
9020
public TryStatementSyntax AddBlockAttributeLists(params AttributeListSyntax[] items) => WithBlock(this.
Block
.WithAttributeLists(this.
Block
.AttributeLists.AddRange(items)));
9021
public TryStatementSyntax AddBlockStatements(params StatementSyntax[] items) => WithBlock(this.
Block
.WithStatements(this.
Block
.Statements.AddRange(items)));
Syntax\LookupPosition.cs (1)
431
return tryStmt.
Block
.CloseBraceToken;
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
180
block = tryStatement.
Block
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (3)
233
if (!tryStatement.TryKeyword.IsMissing && tryStatement.
Block
!= null && !tryStatement.
Block
.CloseBraceToken.IsMissing)
235
AddSuppressWrappingIfOnSingleLineOperation(list, tryStatement.TryKeyword, tryStatement.
Block
.CloseBraceToken);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (2)
642
&& tryStatementNode.
Block
.OpenBraceToken.IsMissing
643
&& !tryStatementNode.
Block
.Span.Contains(caretPosition);
Microsoft.CodeAnalysis.CSharp.Features (7)
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
286
AddLastStatementOfConstruct(tryStatement.
Block
);
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
181
tryStatement.
Block
!= block ||
EditAndContinue\BreakpointSpans.cs (1)
746
return TryCreateSpanForStatement(tryStatement.
Block
, position);
EditAndContinue\SyntaxComparer.cs (2)
1091
distance = 0.5 * ComputeValueDistance(leftTry.
Block
, rightTry.
Block
) +
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
39
=> (tryStatement.
Block
.Statements, tryStatement.Finally?.Block.Statements ?? default);
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
180
block = tryStatement.
Block
;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Generated\Syntax.Test.xml.Generated.cs (2)
12889
Assert.NotNull(node.
Block
);
12892
var newNode = node.WithAttributeLists(node.AttributeLists).WithTryKeyword(node.TryKeyword).WithBlock(node.
Block
).WithCatches(node.Catches).WithFinally(node.Finally);
Parsing\StatementParsingTests.cs (6)
1236
Assert.NotNull(ts.
Block
);
1266
Assert.NotNull(ts.
Block
);
1295
Assert.NotNull(ts.
Block
);
1319
Assert.NotNull(ts.
Block
);
1362
Assert.NotNull(ts.
Block
);
1385
Assert.NotNull(ts.
Block
);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (3)
233
if (!tryStatement.TryKeyword.IsMissing && tryStatement.
Block
!= null && !tryStatement.
Block
.CloseBraceToken.IsMissing)
235
AddSuppressWrappingIfOnSingleLineOperation(list, tryStatement.TryKeyword, tryStatement.
Block
.CloseBraceToken);
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (3)
233
if (!tryStatement.TryKeyword.IsMissing && tryStatement.
Block
!= null && !tryStatement.
Block
.CloseBraceToken.IsMissing)
235
AddSuppressWrappingIfOnSingleLineOperation(list, tryStatement.TryKeyword, tryStatement.
Block
.CloseBraceToken);