35 references to UsingKeyword
Microsoft.CodeAnalysis.CSharp (11)
Binder\UsingStatementBinder.cs (1)
84
var boundUsingStatement = BindUsingStatementOrDeclarationFromParts((CSharpSyntaxNode)expressionSyntax ?? declarationSyntax, _syntax.
UsingKeyword
, _syntax.AwaitKeyword, originalBinder, this, diagnostics);
Syntax.xml.Main.Generated.cs (1)
1900
=> 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"));
Syntax.xml.Syntax.Generated.cs (8)
7992
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)
8003
public new UsingStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.AwaitKeyword, this.
UsingKeyword
, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement);
8004
public UsingStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword) => Update(this.AttributeLists, awaitKeyword, this.
UsingKeyword
, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement);
8006
public UsingStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.
UsingKeyword
, openParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement);
8007
public UsingStatementSyntax WithDeclaration(VariableDeclarationSyntax? declaration) => Update(this.AttributeLists, this.AwaitKeyword, this.
UsingKeyword
, this.OpenParenToken, declaration, this.Expression, this.CloseParenToken, this.Statement);
8008
public UsingStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.AwaitKeyword, this.
UsingKeyword
, this.OpenParenToken, this.Declaration, expression, this.CloseParenToken, this.Statement);
8009
public UsingStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.
UsingKeyword
, this.OpenParenToken, this.Declaration, this.Expression, closeParenToken, this.Statement);
8010
public UsingStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.AwaitKeyword, this.
UsingKeyword
, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, statement);
Syntax\LookupPosition.cs (1)
359
return ((UsingStatementSyntax)statement).
UsingKeyword
;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
125
outermostUsing.
UsingKeyword
.GetLocation(),
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
81
.WithUsingKeyword(usingStatement.
UsingKeyword
.WithLeadingTrivia())
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
200
usingStatement.
UsingKeyword
.WithAppendedTrailingTrivia(ElasticMarker),
Microsoft.CodeAnalysis.CSharp.Features (5)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1763
return TextSpan.FromBounds(usingStatement.
UsingKeyword
.SpanStart, usingStatement.CloseParenToken.Span.End);
Highlighting\KeywordHighlighters\UsingStatementHighlighter.cs (1)
28
=> highlights.Add(usingStatement.
UsingKeyword
.Span);
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
125
outermostUsing.
UsingKeyword
.GetLocation(),
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
81
.WithUsingKeyword(usingStatement.
UsingKeyword
.WithLeadingTrivia())
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
200
usingStatement.
UsingKeyword
.WithAppendedTrailingTrivia(ElasticMarker),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Generated\Syntax.Test.xml.Generated.cs (2)
12700
Assert.Equal(SyntaxKind.UsingKeyword, node.
UsingKeyword
.Kind());
12706
var newNode = node.WithAttributeLists(node.AttributeLists).WithAwaitKeyword(node.AwaitKeyword).WithUsingKeyword(node.
UsingKeyword
).WithOpenParenToken(node.OpenParenToken).WithDeclaration(node.Declaration).WithExpression(node.Expression).WithCloseParenToken(node.CloseParenToken).WithStatement(node.Statement);
Parsing\StatementParsingTests.cs (14)
2345
Assert.NotEqual(default, us.
UsingKeyword
);
2346
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());
2367
Assert.NotEqual(default, us.
UsingKeyword
);
2368
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());
2460
Assert.NotEqual(default, us.
UsingKeyword
);
2461
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());
2800
Assert.NotEqual(default, us.
UsingKeyword
);
2801
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());
2925
Assert.NotEqual(default, us.
UsingKeyword
);
2926
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());
3008
Assert.NotEqual(default, us.
UsingKeyword
);
3009
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());
3080
Assert.NotEqual(default, us.
UsingKeyword
);
3081
Assert.Equal(SyntaxKind.UsingKeyword, us.
UsingKeyword
.Kind());