43 references to Expression
Microsoft.CodeAnalysis.CSharp (13)
Binder\LocalBinderFactory.cs (1)
552ExpressionSyntax expressionSyntax = node.Expression;
Binder\UsingStatementBinder.cs (1)
72return _syntax.Expression;
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); 8009public UsingStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, closeParenToken, this.Statement); 8010public UsingStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.AwaitKeyword, this.UsingKeyword, this.OpenParenToken, this.Declaration, this.Expression, this.CloseParenToken, statement);
Syntax\SyntaxBindingUtilities.cs (2)
18or UsingStatementSyntax { Expression: not null, AwaitKeyword.RawKind: not 0 }; 22or UsingStatementSyntax { Expression: not null }
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
179(nodeParent is UsingStatementSyntax usingStatement && usingStatement.Expression == node) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
124expression = usingStatement is { Declaration.Variables: [{ Initializer.Value: { } value }] } ? value : usingStatement.Expression;
Microsoft.CodeAnalysis.CSharp.Features (10)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
81AddExpressionTerms(node.Expression, _expressions);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
869(SyntaxNode?)oldNode.Declaration ?? oldNode.Expression!, 870(SyntaxNode?)newNode.Declaration ?? newNode.Expression!); 3046getTypedNodes: static n => OneOrMany.Create<SyntaxNode>(n.Expression!),
EditAndContinue\SyntaxComparer.cs (2)
822(SyntaxNode?)leftUsing.Expression ?? leftUsing.Declaration!, 824(SyntaxNode?)rightUsing.Expression ?? rightUsing.Declaration!,
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
208.WithExpression(VisitNode(node.Expression))
Snippets\CSharpUsingSnippetProvider.cs (1)
30var expression = node.Expression!;
src\Compilers\CSharp\Portable\Syntax\SyntaxBindingUtilities.cs (2)
18or UsingStatementSyntax { Expression: not null, AwaitKeyword.RawKind: not 0 }; 22or UsingStatementSyntax { Expression: not null }
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\GetSemanticInfoBrokenCodeTests.cs (1)
226model.GetSymbolInfo(usingSyntax.Expression);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Generated\Syntax.Test.xml.Generated.cs (2)
12703Assert.Null(node.Expression); 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 (9)
2349Assert.NotNull(us.Expression); 2350Assert.Equal("a", us.Expression.ToString()); 2383Assert.Null(us.Expression); 2478Assert.Null(us.Expression); 2826Assert.Null(us.Expression); 2929Assert.NotNull(us.Expression); 2930Assert.Equal("f ? x = a : x = b", us.Expression.ToString()); 3013Assert.Null(us.Expression); 3085Assert.Null(us.Expression);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
LocalVariableDeclaratorsCollector.cs (1)
46if (node.Expression != null)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
179(nodeParent is UsingStatementSyntax usingStatement && usingStatement.Expression == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
124expression = usingStatement is { Declaration.Variables: [{ Initializer.Value: { } value }] } ? value : usingStatement.Expression;
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1164if (((CSharp.Syntax.UsingStatementSyntax)parent).Expression == syntax)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
179(nodeParent is UsingStatementSyntax usingStatement && usingStatement.Expression == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
124expression = usingStatement is { Declaration.Variables: [{ Initializer.Value: { } value }] } ? value : usingStatement.Expression;