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