1 implementation of IUnaryOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5204internal sealed partial class UnaryOperation : Operation, IUnaryOperation
48 references to IUnaryOperation
Microsoft.CodeAnalysis (12)
Generated\OperationKind.Generated.cs (2)
78/// <summary>Indicates an <see cref="IUnaryOperation"/>.</summary> 80/// <summary>Indicates an <see cref="IUnaryOperation"/>. Use <see cref="Unary"/> instead.</summary>
Generated\Operations.Generated.cs (4)
1992/// Note that this operation is different from an <see cref="IUnaryOperation" /> as it mutates the <see cref="Target" />, 10391public override IOperation VisitUnaryOperator(IUnaryOperation operation, object? argument) 10880public virtual void VisitUnaryOperator(IUnaryOperation operation) => DefaultVisit(operation); 11016public virtual TResult? VisitUnaryOperator(IUnaryOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (6)
2232public override IOperation VisitUnaryOperator(IUnaryOperation operation, int? captureIdForResult) 2244private static bool IsBooleanLogicalNot(IUnaryOperation operation) 2689IUnaryOperation? lastUnary = null; 2698case IUnaryOperation unary when IsBooleanLogicalNot(unary): 2838var unOp = (IUnaryOperation)condition;
Microsoft.CodeAnalysis.CodeStyle (1)
HashCodeAnalyzer.cs (1)
233return value is IUnaryOperation unary
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
1364private IUnaryOperation CreateBoundUnaryOperatorOperation(BoundUnaryOperator boundUnaryOperator)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
CastSimplifier.cs (2)
648if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation } unaryOperation) 1238if (operation is IUnaryOperation { OperatorMethod: not null })
CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ConvertToRecordHelpers.cs (3)
137ReturnedValue: IUnaryOperation 733(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 793(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertToRecordHelpers.cs (3)
137ReturnedValue: IUnaryOperation 733(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 793(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
IOperation\IOperationTests_IUnaryOperatorExpression.cs (6)
3638var operation = (IUnaryOperation)VerifyOperationTreeForTest<PrefixUnaryExpressionSyntax>(compilation, expectedOperationTree); 3661var operation = (IUnaryOperation)VerifyOperationTreeForTest<PrefixUnaryExpressionSyntax>(compilation, expectedOperationTree); 3687var operation = (IUnaryOperation)VerifyOperationTreeForTest<PrefixUnaryExpressionSyntax>(compilation, expectedOperationTree);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CastSimplifier.cs (2)
648if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation } unaryOperation) 1238if (operation is IUnaryOperation { OperatorMethod: not null })
Microsoft.CodeAnalysis.Features (1)
HashCodeAnalyzer.cs (1)
233return value is IUnaryOperation unary
Microsoft.CodeAnalysis.Test.Utilities (11)
Compilation\OperationTreeVerifier.cs (2)
1155public override void VisitUnaryOperator(IUnaryOperation operation) 1157LogString(nameof(IUnaryOperation));
Compilation\TestOperationVisitor.cs (1)
727public override void VisitUnaryOperator(IUnaryOperation operation)
Diagnostics\OperationTestAnalyzer.cs (8)
1531IUnaryOperation unary = (IUnaryOperation)operationContext.Operation; 1640var unary = (IUnaryOperation)operationContext.Operation; 1796var unary = (IUnaryOperation)operation; 1971var unary = (IUnaryOperation)operationContext.Operation;
Microsoft.CodeAnalysis.VisualBasic (2)
Operations\VisualBasicOperationFactory.vb (2)
498Private Function CreateBoundUnaryOperatorOperation(boundUnaryOperator As BoundUnaryOperator) As IUnaryOperation 511Private Function CreateBoundUserDefinedUnaryOperatorOperation(boundUserDefinedUnaryOperator As BoundUserDefinedUnaryOperator) As IUnaryOperation
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests.vb (2)
132Dim negate3 As IUnaryOperation = DirectCast(assignment3.Value, IUnaryOperation)