36 references to Type
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Statements.cs (6)
3286type = this.BindType(declaration.Type, diagnostics).Type; 3300Error(diagnostics, ErrorCode.ERR_BadExceptionType, declaration.Type); 3302diagnostics.Add(declaration.Type, useSiteInfo); 3342Error(diagnostics, ErrorCode.ERR_UnreachableCatch, declaration.Type, previousType); 3343diagnostics.Add(declaration.Type, useSiteInfo); 3348diagnostics.Add(declaration.Type, useSiteInfo);
Binder\CatchClauseBinder.cs (1)
34locals.Add(SourceLocalSymbol.MakeLocal(this.ContainingMemberOrLambda, this, allowRefKind: false, allowScoped: false, declarationOpt.Type, declarationOpt.Identifier, LocalDeclarationKind.CatchVariable, initializer: null));
Syntax.xml.Main.Generated.cs (1)
1948=> node.Update(VisitToken(node.OpenParenToken), (TypeSyntax?)Visit(node.Type) ?? throw new ArgumentNullException("type"), VisitToken(node.Identifier), VisitToken(node.CloseParenToken));
Syntax.xml.Syntax.Generated.cs (4)
9131if (openParenToken != this.OpenParenToken || type != this.Type || identifier != this.Identifier || closeParenToken != this.CloseParenToken) 9141public CatchDeclarationSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(openParenToken, this.Type, this.Identifier, this.CloseParenToken); 9143public CatchDeclarationSyntax WithIdentifier(SyntaxToken identifier) => Update(this.OpenParenToken, this.Type, identifier, this.CloseParenToken); 9144public 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.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
898.WithLeadingTrivia(catchDeclarationSyntax.Type.GetLeadingTrivia()) 899.WithTrailingTrivia(catchDeclarationSyntax.Type.GetTrailingTrivia());
Microsoft.CodeAnalysis.CSharp.Features (3)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (3)
197if (SyntaxFactory.AreEquivalent(exceptionType, catchClause.Declaration.Type.ConvertToSingleLine())) 201catchClause.Declaration.Type is IdentifierNameSyntax { Identifier.ValueText: nameof(Exception) }) 206if (catchClause.Declaration.Type is QualifiedNameSyntax
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (14)
Generated\Syntax.Test.xml.Generated.cs (2)
12915Assert.NotNull(node.Type); 12918var newNode = node.WithOpenParenToken(node.OpenParenToken).WithType(node.Type).WithIdentifier(node.Identifier).WithCloseParenToken(node.CloseParenToken);
Parsing\StatementParsingTests.cs (12)
1242Assert.NotNull(ts.Catches[0].Declaration.Type); 1243Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1272Assert.NotNull(ts.Catches[0].Declaration.Type); 1273Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1326Assert.NotNull(ts.Catches[0].Declaration.Type); 1327Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1336Assert.NotNull(ts.Catches[1].Declaration.Type); 1337Assert.Equal("T2", ts.Catches[1].Declaration.Type.ToString()); 1392Assert.NotNull(ts.Catches[0].Declaration.Type); 1393Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1402Assert.NotNull(ts.Catches[1].Declaration.Type); 1403Assert.Equal("T2", ts.Catches[1].Declaration.Type.ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
898.WithLeadingTrivia(catchDeclarationSyntax.Type.GetLeadingTrivia()) 899.WithTrailingTrivia(catchDeclarationSyntax.Type.GetTrailingTrivia());
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
898.WithLeadingTrivia(catchDeclarationSyntax.Type.GetLeadingTrivia()) 899.WithTrailingTrivia(catchDeclarationSyntax.Type.GetTrailingTrivia());