2 overrides of ExpressionStatement
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3153public override SyntaxNode ExpressionStatement(SyntaxNode expression)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
178Public Overrides Function ExpressionStatement(expression As SyntaxNode) As SyntaxNode
60 references to ExpressionStatement
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
257var statement = generator.ExpressionStatement(createAddOrRemoveHandler(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
335var statement = generator.ExpressionStatement(createAddOrRemoveHandler(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
200g.ExpressionStatement( 209statements.Add(g.ExpressionStatement(
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
109var expressionStatement = (TStatementSyntax)generator.ExpressionStatement(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (5)
113? generator.ExpressionStatement(invocationExpression) 235return [generator.ExpressionStatement(expression)]; 341var statement = factory.ExpressionStatement(assignExpression); 399factory.ExpressionStatement( 409return factory.ExpressionStatement(factory.AssignmentStatement(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (2)
62statements.Add(factory.ExpressionStatement( 157statements.Add(factory.ExpressionStatement(
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
161result.Add(generator.ExpressionStatement(generator.AssignmentStatement(
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
99g.ExpressionStatement(g.InvocationExpression(
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
64var setAccessorStatement = generator.ExpressionStatement(generator.AssignmentStatement(
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
153(StatementSyntax)generator.ExpressionStatement(
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
161result.Add(generator.ExpressionStatement(generator.AssignmentStatement(
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
99g.ExpressionStatement(g.InvocationExpression(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (10)
CodeGeneration\SyntaxGeneratorTests.cs (10)
484VerifySyntax<ExpressionStatementSyntax>(Generator.ExpressionStatement(Generator.IdentifierName("x")), "x;"); 485VerifySyntax<ExpressionStatementSyntax>(Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("x"))), "x();"); 3535Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), 3538Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg"))) 3562Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), 3565Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg"))) 3582Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), 3585Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg"))) 3615Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), 3618Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))
Microsoft.CodeAnalysis.Features (6)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
858(field, index) => generator.ExpressionStatement(
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
385var body = factory.ExpressionStatement(
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
527var initializationStatement = (TStatementSyntax)generator.ExpressionStatement(
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
433? generator.ExpressionStatement(invocation)
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (1)
53resultingNode = generator.ExpressionStatement(resultingNode);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
109var expressionStatement = (TStatementSyntax)generator.ExpressionStatement(
Microsoft.CodeAnalysis.VisualBasic.Features (1)
ConvertAutoPropertyToFullProperty\VisualBasicConvertAutoPropertyToFullProperty.vb (1)
57Dim setStatement = New SyntaxList(Of StatementSyntax)(DirectCast(generator.ExpressionStatement(
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (12)
CodeGeneration\SyntaxGeneratorTests.vb (12)
442VerifySyntax(Of ExpressionStatementSyntax)(Generator.ExpressionStatement(Generator.IdentifierName("x")), "x") 443VerifySyntax(Of ExpressionStatementSyntax)(Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("x"))), "x()") 2963Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))} 2984Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))} 3000Dim stmts = {Generator.ExpressionStatement(Generator.IdentifierName("x")), Generator.ExpressionStatement(Generator.IdentifierName("y"))} 3100Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))} 3125Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))}
Microsoft.CodeAnalysis.Workspaces (12)
Shared\Extensions\SyntaxGeneratorExtensions.cs (5)
75setBody = codeFactory.ExpressionStatement( 102: codeFactory.ExpressionStatement( 118setBody = codeFactory.ExpressionStatement( 137setBody = codeFactory.ExpressionStatement( 278? [codeFactory.ExpressionStatement(body)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (5)
113? generator.ExpressionStatement(invocationExpression) 235return [generator.ExpressionStatement(expression)]; 341var statement = factory.ExpressionStatement(assignExpression); 399factory.ExpressionStatement( 409return factory.ExpressionStatement(factory.AssignmentStatement(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (2)
62statements.Add(factory.ExpressionStatement( 157statements.Add(factory.ExpressionStatement(
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
363return generator.ExpressionStatement(