36 references to Type
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Statements.cs (6)
3286
type = this.BindType(declaration.
Type
, diagnostics).Type;
3300
Error(diagnostics, ErrorCode.ERR_BadExceptionType, declaration.
Type
);
3302
diagnostics.Add(declaration.
Type
, useSiteInfo);
3342
Error(diagnostics, ErrorCode.ERR_UnreachableCatch, declaration.
Type
, previousType);
3343
diagnostics.Add(declaration.
Type
, useSiteInfo);
3348
diagnostics.Add(declaration.
Type
, useSiteInfo);
Binder\CatchClauseBinder.cs (1)
34
locals.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)
9131
if (openParenToken != this.OpenParenToken || type != this.
Type
|| identifier != this.Identifier || closeParenToken != this.CloseParenToken)
9141
public CatchDeclarationSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(openParenToken, this.
Type
, this.Identifier, this.CloseParenToken);
9143
public CatchDeclarationSyntax WithIdentifier(SyntaxToken identifier) => Update(this.OpenParenToken, this.
Type
, identifier, this.CloseParenToken);
9144
public CatchDeclarationSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.OpenParenToken, this.
Type
, this.Identifier, closeParenToken);
Syntax\SyntaxFacts.cs (1)
135
return ((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)
197
if (SyntaxFactory.AreEquivalent(exceptionType, catchClause.Declaration.
Type
.ConvertToSingleLine()))
201
catchClause.Declaration.
Type
is IdentifierNameSyntax { Identifier.ValueText: nameof(Exception) })
206
if (catchClause.Declaration.
Type
is QualifiedNameSyntax
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (14)
Generated\Syntax.Test.xml.Generated.cs (2)
12915
Assert.NotNull(node.
Type
);
12918
var newNode = node.WithOpenParenToken(node.OpenParenToken).WithType(node.
Type
).WithIdentifier(node.Identifier).WithCloseParenToken(node.CloseParenToken);
Parsing\StatementParsingTests.cs (12)
1242
Assert.NotNull(ts.Catches[0].Declaration.
Type
);
1243
Assert.Equal("T", ts.Catches[0].Declaration.
Type
.ToString());
1272
Assert.NotNull(ts.Catches[0].Declaration.
Type
);
1273
Assert.Equal("T", ts.Catches[0].Declaration.
Type
.ToString());
1326
Assert.NotNull(ts.Catches[0].Declaration.
Type
);
1327
Assert.Equal("T", ts.Catches[0].Declaration.
Type
.ToString());
1336
Assert.NotNull(ts.Catches[1].Declaration.
Type
);
1337
Assert.Equal("T2", ts.Catches[1].Declaration.
Type
.ToString());
1392
Assert.NotNull(ts.Catches[0].Declaration.
Type
);
1393
Assert.Equal("T", ts.Catches[0].Declaration.
Type
.ToString());
1402
Assert.NotNull(ts.Catches[1].Declaration.
Type
);
1403
Assert.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());