1 instantiation of CatchDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (1)
Syntax.xml.Internal.Generated.cs (1)
14786internal override SyntaxNode CreateRed(SyntaxNode? parent, int position) => new CSharp.Syntax.CatchDeclarationSyntax(this, parent, position);
70 references to CatchDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Statements.cs (1)
3291var declaration = node.Declaration;
Binder\CatchClauseBinder.cs (1)
31var declarationOpt = _syntax.Declaration;
CodeGen\EmitStatement.cs (1)
1090var declaration = syntax.Declaration;
Compilation\CSharpSemanticModel.cs (2)
3311public ILocalSymbol GetDeclaredSymbol(CatchDeclarationSyntax catchDeclaration) 5188return this.GetDeclaredSymbol((CatchDeclarationSyntax)node);
CSharpExtensions.cs (1)
1616public static ILocalSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, CatchDeclarationSyntax catchDeclaration, CancellationToken cancellationToken = default(CancellationToken))
Symbols\Source\SourceLocalSymbol.cs (1)
545Debug.Assert(node is CatchDeclarationSyntax);
Syntax.xml.Main.Generated.cs (10)
463public virtual TResult? VisitCatchDeclaration(CatchDeclarationSyntax node) => this.DefaultVisit(node); 1210public virtual void VisitCatchDeclaration(CatchDeclarationSyntax node) => this.DefaultVisit(node); 1954=> node.Update(VisitToken(node.CatchKeyword), (CatchDeclarationSyntax?)Visit(node.Declaration), (CatchFilterClauseSyntax?)Visit(node.Filter), (BlockSyntax?)Visit(node.Block) ?? throw new ArgumentNullException("block")); 1956public override SyntaxNode? VisitCatchDeclaration(CatchDeclarationSyntax node) 4705public static CatchClauseSyntax CatchClause(SyntaxToken catchKeyword, CatchDeclarationSyntax? declaration, CatchFilterClauseSyntax? filter, BlockSyntax block) 4713public static CatchClauseSyntax CatchClause(CatchDeclarationSyntax? declaration, CatchFilterClauseSyntax? filter, BlockSyntax block) 4721public static CatchDeclarationSyntax CatchDeclaration(SyntaxToken openParenToken, TypeSyntax type, SyntaxToken identifier, SyntaxToken closeParenToken) 4732return (CatchDeclarationSyntax)Syntax.InternalSyntax.SyntaxFactory.CatchDeclaration((Syntax.InternalSyntax.SyntaxToken)openParenToken.Node!, (Syntax.InternalSyntax.TypeSyntax)type.Green, (Syntax.InternalSyntax.SyntaxToken?)identifier.Node, (Syntax.InternalSyntax.SyntaxToken)closeParenToken.Node!).CreateRed(); 4736public static CatchDeclarationSyntax CatchDeclaration(TypeSyntax type, SyntaxToken identifier) 4740public static CatchDeclarationSyntax CatchDeclaration(TypeSyntax type)
Syntax.xml.Syntax.Generated.cs (10)
9078private CatchDeclarationSyntax? declaration; 9089public CatchDeclarationSyntax? Declaration => GetRed(ref this.declaration, 1); 9116public CatchClauseSyntax Update(SyntaxToken catchKeyword, CatchDeclarationSyntax? declaration, CatchFilterClauseSyntax? filter, BlockSyntax block) 9129public CatchClauseSyntax WithDeclaration(CatchDeclarationSyntax? declaration) => Update(this.CatchKeyword, declaration, this.Filter, this.Block); 9174public CatchDeclarationSyntax Update(SyntaxToken openParenToken, TypeSyntax type, SyntaxToken identifier, SyntaxToken closeParenToken) 9178var newNode = SyntaxFactory.CatchDeclaration(openParenToken, type, identifier, closeParenToken); 9186public CatchDeclarationSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(openParenToken, this.Type, this.Identifier, this.CloseParenToken); 9187public CatchDeclarationSyntax WithType(TypeSyntax type) => Update(this.OpenParenToken, type, this.Identifier, this.CloseParenToken); 9188public CatchDeclarationSyntax WithIdentifier(SyntaxToken identifier) => Update(this.OpenParenToken, this.Type, identifier, this.CloseParenToken); 9189public CatchDeclarationSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.OpenParenToken, this.Type, this.Identifier, closeParenToken);
Syntax\SyntaxFacts.cs (1)
135return ((CatchDeclarationSyntax)parent).Type == node;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
51public override void VisitCatchDeclaration(CatchDeclarationSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
719CatchDeclarationSyntax n => (n.OpenParenToken, n.CloseParenToken),
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (2)
77var catchDeclaration = (CatchDeclarationSyntax)node;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
896var catchDeclarationSyntax = (CatchDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
61case CatchDeclarationSyntax catchDeclaration: 120private static bool IsDiscardDeclaration(CatchDeclarationSyntax catchDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
150CatchDeclarationSyntax catchDeclaration => InferTypeInCatchDeclaration(catchDeclaration), 222CatchDeclarationSyntax catchDeclaration => InferTypeInCatchDeclaration(catchDeclaration, token), 1095private IEnumerable<TypeInferenceInfo> InferTypeInCatchDeclaration(CatchDeclarationSyntax catchDeclaration, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.Features (3)
RemoveUnusedVariable\CSharpRemoveUnusedVariableCodeFixProvider.cs (1)
32=> token.Parent is CatchDeclarationSyntax catchDeclaration && catchDeclaration.Identifier == token;
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (2)
77var catchDeclaration = (CatchDeclarationSyntax)node;
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_TryCatch.cs (1)
873VerifyOperationTreeAndDiagnosticsForTest<CatchDeclarationSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Generated\Syntax.Test.xml.Generated.cs (6)
10845=> SyntaxFactory.CatchClause(SyntaxFactory.Token(SyntaxKind.CatchKeyword), default(CatchDeclarationSyntax), default(CatchFilterClauseSyntax), GenerateBlock()); 10847private static CatchDeclarationSyntax GenerateCatchDeclaration() 12966var node = GenerateCatchDeclaration(); 12972var newNode = node.WithOpenParenToken(node.OpenParenToken).WithType(node.Type).WithIdentifier(node.Identifier).WithCloseParenToken(node.CloseParenToken); 18191var oldNode = GenerateCatchDeclaration(); 18207var oldNode = GenerateCatchDeclaration();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (1)
648declaration is CatchDeclarationSyntax ||
LocalVariableDeclaratorsCollector.cs (1)
100public override void VisitCatchDeclaration(CatchDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
Classification\ClassificationHelpers.cs (1)
238else if (token.Parent is CatchDeclarationSyntax catchDeclaration && catchDeclaration.Identifier == token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
51public override void VisitCatchDeclaration(CatchDeclarationSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
719CatchDeclarationSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
896var catchDeclarationSyntax = (CatchDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
61case CatchDeclarationSyntax catchDeclaration: 120private static bool IsDiscardDeclaration(CatchDeclarationSyntax catchDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
150CatchDeclarationSyntax catchDeclaration => InferTypeInCatchDeclaration(catchDeclaration), 222CatchDeclarationSyntax catchDeclaration => InferTypeInCatchDeclaration(catchDeclaration, token), 1095private IEnumerable<TypeInferenceInfo> InferTypeInCatchDeclaration(CatchDeclarationSyntax catchDeclaration, SyntaxToken? previousToken = null)
Roslyn.Diagnostics.CSharp.Analyzers (9)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
51public override void VisitCatchDeclaration(CatchDeclarationSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
719CatchDeclarationSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
896var catchDeclarationSyntax = (CatchDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
61case CatchDeclarationSyntax catchDeclaration: 120private static bool IsDiscardDeclaration(CatchDeclarationSyntax catchDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
150CatchDeclarationSyntax catchDeclaration => InferTypeInCatchDeclaration(catchDeclaration), 222CatchDeclarationSyntax catchDeclaration => InferTypeInCatchDeclaration(catchDeclaration, token), 1095private IEnumerable<TypeInferenceInfo> InferTypeInCatchDeclaration(CatchDeclarationSyntax catchDeclaration, SyntaxToken? previousToken = null)