1 implementation of IUnaryOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5577internal sealed partial class UnaryOperation : Operation, IUnaryOperation
48 references to IUnaryOperation
ILLink.RoslynAnalyzer (1)
DataFlow\FeatureChecksVisitor.cs (1)
62 public override FeatureChecksValue VisitUnaryOperator (IUnaryOperation operation, StateValue state)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
134var operation = ((IUnaryOperation)condition).Operand;
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)
2156/// Note that this operation is different from an <see cref="IUnaryOperation" /> as it mutates the <see cref="Target" />, 10941public override IOperation VisitUnaryOperator(IUnaryOperation operation, object? argument) 11445public virtual void VisitUnaryOperator(IUnaryOperation operation) => DefaultVisit(operation); 11584public virtual TResult? VisitUnaryOperator(IUnaryOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (6)
2249public override IOperation VisitUnaryOperator(IUnaryOperation operation, int? captureIdForResult) 2261private static bool IsBooleanLogicalNot(IUnaryOperation operation) 2706IUnaryOperation? lastUnary = null; 2715case IUnaryOperation unary when IsBooleanLogicalNot(unary): 2855var unOp = (IUnaryOperation)condition;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
233return value is IUnaryOperation unary
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
1431private IUnaryOperation CreateBoundUnaryOperatorOperation(BoundUnaryOperator boundUnaryOperator)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
795if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation }) 1414if (operation is IUnaryOperation { OperatorMethod: not null })
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
137ReturnedValue: IUnaryOperation 734(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 794(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
137ReturnedValue: IUnaryOperation 734(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 794(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
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)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
795if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation }) 1414if (operation is IUnaryOperation { OperatorMethod: not null })
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
233return value is IUnaryOperation unary
Microsoft.CodeAnalysis.Test.Utilities (11)
Compilation\OperationTreeVerifier.cs (2)
1164public override void VisitUnaryOperator(IUnaryOperation operation) 1166LogString(nameof(IUnaryOperation));
Compilation\TestOperationVisitor.cs (1)
745public 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;
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests.vb (2)
132Dim negate3 As IUnaryOperation = DirectCast(assignment3.Value, IUnaryOperation)