31 references to TryKeyword
Microsoft.CodeAnalysis.CSharp (7)
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); 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); 9016public TryStatementSyntax WithFinally(FinallyClauseSyntax? @finally) => Update(this.AttributeLists, this.TryKeyword, this.Block, this.Catches, @finally);
Syntax\LookupPosition.cs (1)
355return ((TryStatementSyntax)statement).TryKeyword;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (2)
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.cs (1)
614TryStatementSyntax tryStatementNode => tryStatementNode.TryKeyword.Span.End,
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
641=> !tryStatementNode.TryKeyword.IsMissing
Microsoft.CodeAnalysis.CSharp.Features (2)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1780return ((TryStatementSyntax)node).TryKeyword.Span;
Highlighting\KeywordHighlighters\TryStatementHighlighter.cs (1)
30highlights.Add(tryStatement.TryKeyword.Span);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (14)
Generated\Syntax.Test.xml.Generated.cs (2)
12888Assert.Equal(SyntaxKind.TryKeyword, node.TryKeyword.Kind()); 12892var newNode = node.WithAttributeLists(node.AttributeLists).WithTryKeyword(node.TryKeyword).WithBlock(node.Block).WithCatches(node.Catches).WithFinally(node.Finally);
Parsing\StatementParsingTests.cs (12)
1234Assert.NotEqual(default, ts.TryKeyword); 1235Assert.False(ts.TryKeyword.IsMissing); 1264Assert.NotEqual(default, ts.TryKeyword); 1265Assert.False(ts.TryKeyword.IsMissing); 1293Assert.NotEqual(default, ts.TryKeyword); 1294Assert.False(ts.TryKeyword.IsMissing); 1317Assert.NotEqual(default, ts.TryKeyword); 1318Assert.False(ts.TryKeyword.IsMissing); 1360Assert.NotEqual(default, ts.TryKeyword); 1361Assert.False(ts.TryKeyword.IsMissing); 1383Assert.NotEqual(default, ts.TryKeyword); 1384Assert.False(ts.TryKeyword.IsMissing);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (2)
233if (!tryStatement.TryKeyword.IsMissing && tryStatement.Block != null && !tryStatement.Block.CloseBraceToken.IsMissing) 235AddSuppressWrappingIfOnSingleLineOperation(list, tryStatement.TryKeyword, tryStatement.Block.CloseBraceToken);
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (2)
233if (!tryStatement.TryKeyword.IsMissing && tryStatement.Block != null && !tryStatement.Block.CloseBraceToken.IsMissing) 235AddSuppressWrappingIfOnSingleLineOperation(list, tryStatement.TryKeyword, tryStatement.Block.CloseBraceToken);