41 references to Declaration
Microsoft.CodeAnalysis.CSharp (12)
_generated\0\Syntax.xml.Main.Generated.cs (1)
1912=> node.Update(VisitList(node.AttributeLists), VisitToken(node.AwaitKeyword), VisitToken(node.UsingKeyword), VisitToken(node.OpenParenToken), (VariableDeclarationSyntax?)Visit(node.Declaration), (ExpressionSyntax?)Visit(node.Expression), VisitToken(node.CloseParenToken), (StatementSyntax?)Visit(node.Statement) ?? throw new ArgumentNullException("statement"));
_generated\2\Syntax.xml.Syntax.Generated.cs (8)
8038if (attributeLists != this.AttributeLists || awaitKeyword != this.AwaitKeyword || usingKeyword != this.UsingKeyword || openParenToken != this.OpenParenToken || declaration != this.Declaration || expression != this.Expression || closeParenToken != this.CloseParenToken || statement != this.Statement) 8049public new UsingStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8050public UsingStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword) => Update(this.AttributeLists, awaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8051public UsingStatementSyntax WithUsingKeyword(SyntaxToken usingKeyword) => Update(this.AttributeLists, this.AwaitKeyword, usingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8052public UsingStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, openParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8054public UsingStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, expression, this.CloseParenToken, this.Statement); 8055public UsingStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, closeParenToken, this.Statement); 8056public UsingStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, statement);
Binder\LocalBinderFactory.cs (1)
553VariableDeclarationSyntax declarationSyntax = node.Declaration;
Binder\UsingStatementBinder.cs (2)
30VariableDeclarationSyntax declarationSyntax = _syntax.Declaration; 79VariableDeclarationSyntax declarationSyntax = _syntax.Declaration;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
103if (current.Declaration == null)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (3)
74usingStatement.Declaration != null) 181case UsingStatementSyntax childUsing when childUsing.Declaration != null: 199usingStatement.Declaration!,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
119expression = usingStatement is { Declaration.Variables: [{ Initializer.Value: { } value }] } ? value : usingStatement.Expression;
Microsoft.CodeAnalysis.CSharp.Features (19)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (2)
76if (node.Declaration != null) 78AddVariableExpressions(node.Declaration.Variables, _expressions);
EditAndContinue\BreakpointSpans.cs (2)
696if (usingStatement.Declaration != null) 698return TryCreateSpanForNode(usingStatement.Declaration, position);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
869(SyntaxNode?)oldNode.Declaration ?? oldNode.Expression!, 870(SyntaxNode?)newNode.Declaration ?? newNode.Expression!); 3045nodeSelector: static n => n is UsingStatementSyntax { Declaration: null } usingStatement,
EditAndContinue\SyntaxComparer.cs (7)
396return node is UsingStatementSyntax { Declaration: not null } ? Label.UsingStatementWithDeclarations : Label.UsingStatementWithExpression; 811if (leftUsing.Declaration != null && rightUsing.Declaration != null) 814leftUsing.Declaration, 816rightUsing.Declaration, 822(SyntaxNode?)leftUsing.Expression ?? leftUsing.Declaration!, 824(SyntaxNode?)rightUsing.Expression ?? rightUsing.Declaration!,
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
207return node.WithDeclaration(VisitNode(node.Declaration))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
103if (current.Declaration == null)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (3)
74usingStatement.Declaration != null) 181case UsingStatementSyntax childUsing when childUsing.Declaration != null: 199usingStatement.Declaration!,
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Performance\CSharpPreferHashDataOverComputeHash.Fixer.cs (1)
121case { Parent: UsingStatementSyntax usingStatement } when usingStatement.Declaration?.Variables.Count == 1:
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Rename\LocalConflictVisitor.cs (2)
97if (node.Declaration != null) 99tokens.AddRange(node.Declaration.Variables.Select(v => v.Identifier));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
119expression = usingStatement is { Declaration.Variables: [{ Initializer.Value: { } value }] } ? value : usingStatement.Expression;
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
119expression = usingStatement is { Declaration.Variables: [{ Initializer.Value: { } value }] } ? value : usingStatement.Expression;