53 references to Statement
Microsoft.CodeAnalysis.CSharp (12)
Binder\LocalBinderFactory.cs (1)
571VisitPossibleEmbeddedStatement(node.Statement, usingBinder);
Binder\UsingStatementBinder.cs (1)
171BoundStatement boundBody = originalBinder.BindPossibleEmbeddedStatement(usingBinderOpt!._syntax.Statement, 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)
7992if (attributeLists != this.AttributeLists || awaitKeyword != this.AwaitKeyword || usingKeyword != this.UsingKeyword || openParenToken != this.OpenParenToken || declaration != this.Declaration || expression != this.Expression || closeParenToken != this.CloseParenToken || statement != this.Statement) 8003public new UsingStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8004public UsingStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword) => Update(this.AttributeLists, awaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8005public UsingStatementSyntax WithUsingKeyword(SyntaxToken usingKeyword) => Update(this.AttributeLists, this.AwaitKeyword, usingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8006public UsingStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, openParenToken, this.Declaration, this.Expression, this.CloseParenToken, this.Statement); 8007public UsingStatementSyntax WithDeclaration(VariableDeclarationSyntax? declaration) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, declaration, this.Expression, this.CloseParenToken, this.Statement); 8008public UsingStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, expression, this.CloseParenToken, this.Statement); 8009public UsingStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, closeParenToken, this.Statement);
Syntax\LookupPosition.cs (1)
435return GetFirstExcludedToken(((UsingStatementSyntax)statement).Statement);
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (4)
100for (var current = outermostUsing; current != null; current = current.Statement as UsingStatementSyntax) 149for (var current = outermostUsing; current != null; current = current.Statement as UsingStatementSyntax) 208var innerStatements = innermostUsing.Statement is BlockSyntax block 210: new SyntaxList<StatementSyntax>(innermostUsing.Statement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
141UsingStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
331if (node is UsingStatementSyntax usingStatement && usingStatement.Statement != null && !(usingStatement.Statement is BlockSyntax or UsingStatementSyntax)) 333AddEmbeddedStatementsIndentationOperation(list, usingStatement.Statement);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
138switch (usingStatement.Statement)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
722=> usingStatementNode.Statement is not BlockSyntax
Microsoft.CodeAnalysis.CSharp.Features (13)
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
295AddLastStatementOfConstruct((statement as UsingStatementSyntax).Statement);
EditAndContinue\SyntaxComparer.cs (4)
815leftUsing.Statement, 817rightUsing.Statement); 823leftUsing.Statement, 825rightUsing.Statement);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
209.WithStatement(ReplaceStatementIfNeeded(node.Statement));
Snippets\CSharpUsingSnippetProvider.cs (2)
37static s => (BlockSyntax)s.Statement, 44static s => (BlockSyntax)s.Statement,
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (4)
100for (var current = outermostUsing; current != null; current = current.Statement as UsingStatementSyntax) 149for (var current = outermostUsing; current != null; current = current.Statement as UsingStatementSyntax) 208var innerStatements = innermostUsing.Statement is BlockSyntax block 210: new SyntaxList<StatementSyntax>(innermostUsing.Statement);
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
138switch (usingStatement.Statement)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Generated\Syntax.Test.xml.Generated.cs (2)
12705Assert.NotNull(node.Statement); 12706var 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 (7)
2352Assert.NotNull(us.Statement); 2386Assert.NotNull(us.Statement); 2481Assert.NotNull(us.Statement); 2829Assert.NotNull(us.Statement); 2932Assert.NotNull(us.Statement); 3015Assert.NotNull(us.Statement); 3087Assert.NotNull(us.Statement);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\LocalConflictVisitor.cs (1)
94Visit(node.Statement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
141UsingStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
331if (node is UsingStatementSyntax usingStatement && usingStatement.Statement != null && !(usingStatement.Statement is BlockSyntax or UsingStatementSyntax)) 333AddEmbeddedStatementsIndentationOperation(list, usingStatement.Statement);
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
141UsingStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
331if (node is UsingStatementSyntax usingStatement && usingStatement.Statement != null && !(usingStatement.Statement is BlockSyntax or UsingStatementSyntax)) 333AddEmbeddedStatementsIndentationOperation(list, usingStatement.Statement);