40 references to UnaryOperatorKind
ILLink.RoslynAnalyzer (1)
DataFlow\FeatureChecksVisitor.cs (1)
64 if (operation.OperatorKind is not UnaryOperatorKind.Not)
Microsoft.CodeAnalysis (10)
Generated\Operations.Generated.cs (3)
1057UnaryOperatorKind OperatorKind { get; } 5579internal UnaryOperation(UnaryOperatorKind operatorKind, IOperation operand, bool isLifted, bool isChecked, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5591public UnaryOperatorKind OperatorKind { get; }
Operations\ControlFlowGraphBuilder.cs (7)
2263return operation.OperatorKind == UnaryOperatorKind.Not && 2400return new UnaryOperation(UnaryOperatorKind.Not, operand, isLifted: true, isChecked: false, 2501condition = new UnaryOperation(isAndAlso ? UnaryOperatorKind.False : UnaryOperatorKind.True, 2604condition = new UnaryOperation(isAndAlso ? UnaryOperatorKind.False : UnaryOperatorKind.True, 2741: new UnaryOperation(UnaryOperatorKind.Not, condition, isLifted: false, isChecked: false,
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
234? unary.OperatorKind == UnaryOperatorKind.Minus && IsLiteralNumber(unary.Operand)
Microsoft.CodeAnalysis.CSharp (10)
Operations\CSharpOperationFactory.cs (2)
1433UnaryOperatorKind unaryOperatorKind = Helper.DeriveUnaryOperatorKind(boundUnaryOperator.OperatorKind); 2815UnaryOperatorKind.Hat,
Operations\CSharpOperationFactory_Methods.cs (8)
521internal static UnaryOperatorKind DeriveUnaryOperatorKind(CSharp.UnaryOperatorKind operatorKind) 526return UnaryOperatorKind.Plus; 529return UnaryOperatorKind.Minus; 532return UnaryOperatorKind.Not; 535return UnaryOperatorKind.BitwiseNegation; 538return UnaryOperatorKind.True; 541return UnaryOperatorKind.False; 544return UnaryOperatorKind.None;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
757if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation })
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
139OperatorKind: UnaryOperatorKind.Not, 735(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 795(_, 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)
139OperatorKind: UnaryOperatorKind.Not, 735(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 795(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
757if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation })
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
234? unary.OperatorKind == UnaryOperatorKind.Minus && IsLiteralNumber(unary.Operand)
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\OperationTreeVerifier.cs (1)
1168var kindStr = $"{nameof(UnaryOperatorKind)}.{operation.OperatorKind}";
Compilation\TestOperationVisitor.cs (1)
750var unaryOperationKind = operation.OperatorKind;
Diagnostics\OperationTestAnalyzer.cs (5)
1532if (unary.OperatorKind == UnaryOperatorKind.Minus && unary.OperatorMethod != null && unary.OperatorMethod.Name.Contains("UnaryNegation")) 1537if (unary.OperatorKind == UnaryOperatorKind.Not) 1542if (unary.OperatorKind == UnaryOperatorKind.BitwiseNegation) 1972if (unary.OperatorKind == UnaryOperatorKind.True) 1976else if (unary.OperatorKind == UnaryOperatorKind.False)