1 implementation of IExpressionStatementOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
4865internal sealed partial class ExpressionStatementOperation : Operation, IExpressionStatementOperation
67 references to IExpressionStatementOperation
ILLink.RoslynAnalyzer (1)
DataFlow\LocalDataFlowVisitor.cs (1)
546 public override TValue VisitExpressionStatement (IExpressionStatementOperation operation, LocalDataFlowState<TValue, TContext, TValueLattice, TContextLattice> state)
Microsoft.AspNetCore.App.Analyzers (3)
Authorization\AddAuthorizationBuilderAnalyzer.cs (2)
145if (operation is IExpressionStatementOperation { Operation: { } expressionStatementOperation }) 225return invocation.Parent is IExpressionStatementOperation;
RouteHandlers\DetectMisplacedLambdaAttribute.cs (1)
86else if (op is IExpressionStatementOperation expression)
Microsoft.CodeAnalysis (7)
Generated\OperationKind.Generated.cs (1)
47/// <summary>Indicates an <see cref="IExpressionStatementOperation"/>.</summary>
Generated\Operations.Generated.cs (3)
10866public override IOperation VisitExpressionStatement(IExpressionStatementOperation operation, object? argument) 11430public virtual void VisitExpressionStatement(IExpressionStatementOperation operation) => DefaultVisit(operation); 11569public virtual TResult? VisitExpressionStatement(IExpressionStatementOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (3)
3416var expressionStatement = (IExpressionStatementOperation)_currentStatement; 3554public override IOperation? VisitExpressionStatement(IExpressionStatementOperation operation, int? captureIdForResult)
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
199if (statement is not IExpressionStatementOperation expressionStatement ||
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
388if (memberReference?.Parent?.Parent is IExpressionStatementOperation &&
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
132protected abstract bool IsCallStatement(IExpressionStatementOperation expressionStatement); 137protected abstract bool IsExpressionOfExpressionBody(IExpressionStatementOperation expressionStatement);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (2)
169var expressionStatement = (IExpressionStatementOperation)context.Operation;
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
155if (statement is IExpressionStatementOperation exprStatement &&
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
111out var expressionStatement, out var assignmentExpression)) 139private static bool ValueIsAccessed(SemanticModel semanticModel, IConditionalOperation ifOperation, IBlockOperation containingBlock, ISymbol localOrParameter, IExpressionStatementOperation expressionStatement, IAssignmentOperation assignmentExpression) 169[NotNullWhen(true)] out IExpressionStatementOperation? expressionStatement, 178expressionStatement = containingBlock.Operations[i] as IExpressionStatementOperation;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
418if (firstOp is IExpressionStatementOperation expressionStatement)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (2)
121if (operation is IExpressionStatementOperation 171if (statement is IExpressionStatementOperation expressionStatement &&
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
2206private IExpressionStatementOperation CreateBoundExpressionStatementOperation(BoundExpressionStatement boundExpressionStatement)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
151if (blockOperation is IBlockOperation { Operations: [IThrowOperation or IExpressionStatementOperation { Operation: IThrowOperation }] })
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
74protected override bool IsCallStatement(IExpressionStatementOperation expressionStatement) 77protected override bool IsExpressionOfExpressionBody(IExpressionStatementOperation expressionStatementOperation)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
435if (operation is IExpressionStatementOperation
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
151if (blockOperation is IBlockOperation { Operations: [IThrowOperation or IExpressionStatementOperation { Operation: IThrowOperation }] })
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
74protected override bool IsCallStatement(IExpressionStatementOperation expressionStatement) 77protected override bool IsExpressionOfExpressionBody(IExpressionStatementOperation expressionStatementOperation)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
435if (operation is IExpressionStatementOperation
Microsoft.CodeAnalysis.Features (12)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
199if (statement is not IExpressionStatementOperation expressionStatement ||
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
388if (memberReference?.Parent?.Parent is IExpressionStatementOperation &&
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
132protected abstract bool IsCallStatement(IExpressionStatementOperation expressionStatement); 137protected abstract bool IsExpressionOfExpressionBody(IExpressionStatementOperation expressionStatement);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (2)
169var expressionStatement = (IExpressionStatementOperation)context.Operation;
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
155if (statement is IExpressionStatementOperation exprStatement &&
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
111out var expressionStatement, out var assignmentExpression)) 139private static bool ValueIsAccessed(SemanticModel semanticModel, IConditionalOperation ifOperation, IBlockOperation containingBlock, ISymbol localOrParameter, IExpressionStatementOperation expressionStatement, IAssignmentOperation assignmentExpression) 169[NotNullWhen(true)] out IExpressionStatementOperation? expressionStatement, 178expressionStatement = containingBlock.Operations[i] as IExpressionStatementOperation;
ValueTracking\ValueTracker.OperationCollector.cs (1)
240if (argumentOperation.Value is IExpressionStatementOperation
Microsoft.CodeAnalysis.Test.Utilities (6)
Compilation\OperationTreeVerifier.cs (2)
790public override void VisitExpressionStatement(IExpressionStatementOperation operation) 792LogString(nameof(IExpressionStatementOperation));
Compilation\TestOperationVisitor.cs (1)
505public override void VisitExpressionStatement(IExpressionStatementOperation operation)
Diagnostics\OperationTestAnalyzer.cs (3)
170if (setup.Kind == OperationKind.ExpressionStatement && ((IExpressionStatementOperation)setup).Operation.Kind == OperationKind.SimpleAssignment) 172ISimpleAssignmentOperation setupAssignment = (ISimpleAssignmentOperation)((IExpressionStatementOperation)setup).Operation; 187IOperation advanceExpression = ((IExpressionStatementOperation)advance).Operation;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedParametersAndValues\VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer.vb (2)
49Protected Overrides Function IsCallStatement(expressionStatement As IExpressionStatementOperation) As Boolean 69Protected Overrides Function IsExpressionOfExpressionBody(expressionStatementOperation As IExpressionStatementOperation) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Features (2)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedParametersAndValues\VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer.vb (2)
49Protected Overrides Function IsCallStatement(expressionStatement As IExpressionStatementOperation) As Boolean 69Protected Overrides Function IsExpressionOfExpressionBody(expressionStatementOperation As IExpressionStatementOperation) As Boolean
Microsoft.CodeAnalysis.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
418if (firstOp is IExpressionStatementOperation expressionStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (2)
121if (operation is IExpressionStatementOperation 171if (statement is IExpressionStatementOperation expressionStatement &&
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (8)
IOperation\IOperationTests.vb (5)
62Dim expression1 As IOperation = DirectCast(statement1, IExpressionStatementOperation).Operation 95Dim expression2 As IOperation = DirectCast(statement2, IExpressionStatementOperation).Operation 128Dim expression3 As IOperation = DirectCast(statement3, IExpressionStatementOperation).Operation 187Dim expression1 As IOperation = DirectCast(statement1, IExpressionStatementOperation).Operation 215Dim expression2 As IOperation = DirectCast(statement2, IExpressionStatementOperation).Operation
IOperation\IOperationTests_ICompoundAssignmentOperation.vb (3)
39Dim compoundAssignment = DirectCast(DirectCast(result.operation, IExpressionStatementOperation).Operation, ICompoundAssignmentOperation) 62Dim compoundAssignment = DirectCast(DirectCast(result.operation, IExpressionStatementOperation).Operation, ICompoundAssignmentOperation) 97Dim compoundAssignment = DirectCast(DirectCast(result.operation, IExpressionStatementOperation).Operation, ICompoundAssignmentOperation)