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