1 implementation of OperatorKind
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5284public BinaryOperatorKind OperatorKind { get; }
87 references to OperatorKind
Microsoft.CodeAnalysis (4)
Operations\ControlFlowGraphBuilder.cs (4)
2137switch (operation.OperatorKind) 2213leftOperand = PopStackFrame(frame, new BinaryOperation(operation.OperatorKind, PopOperand(), rightOperand, operation.IsLifted, operation.IsChecked, operation.IsCompareText, 2254switch (binOp.OperatorKind) 2264throw ExceptionUtilities.UnexpectedValue(binOp.OperatorKind);
Microsoft.CodeAnalysis.CodeStyle (6)
AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
42if (operation.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals)) 66var isOperatorEquals = operation.OperatorKind == BinaryOperatorKind.Equals;
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
221if (binaryOperator.OperatorKind != BinaryOperatorKind.Equals)
HashCodeAnalyzer.OperationDeconstructor.cs (2)
108if (binary.OperatorKind == BinaryOperatorKind.Equals) 114else if (binary.OperatorKind == BinaryOperatorKind.NotEquals)
ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
SyntaxGeneratorExtensions_Negate.cs (3)
170if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 176&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 184if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
CastSimplifier.cs (2)
772ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.RightOperand)) 779ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))
CSharpUsePatternCombinatorsAnalyzer.cs (7)
44case IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } op: 47case IBinaryOperation { OperatorKind: NotEquals } op: 50case IBinaryOperation { OperatorKind: ConditionalOr, Syntax: BinaryExpressionSyntax syntax } op: 53case IBinaryOperation { OperatorKind: ConditionalAnd, Syntax: BinaryExpressionSyntax syntax } op: 56case IBinaryOperation op when IsRelationalOperator(op.OperatorKind): 106=> new Relational(Flip(op.OperatorKind), left, op.RightOperand), 108=> new Relational(op.OperatorKind, right, op.LeftOperand),
Helpers.cs (1)
54binaryOperation.OperatorKind == BinaryOperatorKind.Subtract)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
ConvertToRecordHelpers.cs (8)
158OperatorKind: BinaryOperatorKind.Equals, 666return binOp.OperatorKind == expectedKind && 737(true, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalAnd } andOp) 744(false, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalOr } orOp) 751OperatorKind: BinaryOperatorKind.Equals, 759OperatorKind: BinaryOperatorKind.NotEquals, 803OperatorKind: BinaryOperatorKind.ConditionalAnd, 815OperatorKind: BinaryOperatorKind.ConditionalOr,
Microsoft.CodeAnalysis.CSharp.Features (16)
ConvertToRecordHelpers.cs (8)
158OperatorKind: BinaryOperatorKind.Equals, 666return binOp.OperatorKind == expectedKind && 737(true, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalAnd } andOp) 744(false, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalOr } orOp) 751OperatorKind: BinaryOperatorKind.Equals, 759OperatorKind: BinaryOperatorKind.NotEquals, 803OperatorKind: BinaryOperatorKind.ConditionalAnd, 815OperatorKind: BinaryOperatorKind.ConditionalOr,
CSharpUsePatternCombinatorsAnalyzer.cs (7)
44case IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } op: 47case IBinaryOperation { OperatorKind: NotEquals } op: 50case IBinaryOperation { OperatorKind: ConditionalOr, Syntax: BinaryExpressionSyntax syntax } op: 53case IBinaryOperation { OperatorKind: ConditionalAnd, Syntax: BinaryExpressionSyntax syntax } op: 56case IBinaryOperation op when IsRelationalOperator(op.OperatorKind): 106=> new Relational(Flip(op.OperatorKind), left, op.RightOperand), 108=> new Relational(op.OperatorKind, right, op.LeftOperand),
J\s\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs\Helpers.cs (1)
54binaryOperation.OperatorKind == BinaryOperatorKind.Subtract)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CastSimplifier.cs (2)
772ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.RightOperand)) 779ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))
Microsoft.CodeAnalysis.Features (14)
AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
42if (operation.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals)) 66var isOperatorEquals = operation.OperatorKind == BinaryOperatorKind.Equals;
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
221if (binaryOperator.OperatorKind != BinaryOperatorKind.Equals)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (9)
200if (operation is IBinaryOperation { OperatorKind: ConditionalOr } op) 273case IBinaryOperation { OperatorKind: ConditionalAnd } op 277case IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } op: 287case IBinaryOperation { OperatorKind: NotEquals } op 292when Supports(Feature.RelationalPattern) && IsRelationalOperator(op.OperatorKind): 297case IBinaryOperation { OperatorKind: ConditionalAnd } op 344=> new AnalyzedPattern.Relational(Flip(op.OperatorKind), left), 346=> new AnalyzedPattern.Relational(op.OperatorKind, right), 390return op.OperatorKind switch
HashCodeAnalyzer.OperationDeconstructor.cs (2)
108if (binary.OperatorKind == BinaryOperatorKind.Equals) 114else if (binary.OperatorKind == BinaryOperatorKind.NotEquals)
Microsoft.CodeAnalysis.Test.Utilities (18)
Compilation\ControlFlowGraphVerifier.cs (6)
985(binOp.OperatorKind == Operations.BinaryOperatorKind.And || binOp.OperatorKind == Operations.BinaryOperatorKind.Or) && 1011binOp.OperatorKind == Operations.BinaryOperatorKind.And && 1018binOp.OperatorKind == Operations.BinaryOperatorKind.Or && 1901return (binary.OperatorKind != Operations.BinaryOperatorKind.ConditionalAnd && binary.OperatorKind != Operations.BinaryOperatorKind.ConditionalOr) ||
Compilation\OperationTreeVerifier.cs (1)
1181var kindStr = $"{nameof(BinaryOperatorKind)}.{operation.OperatorKind}";
Compilation\TestOperationVisitor.cs (1)
748var binaryOperationKind = operation.OperatorKind;
Diagnostics\OperationTestAnalyzer.cs (10)
204(condition.OperatorKind == BinaryOperatorKind.LessThan || 205condition.OperatorKind == BinaryOperatorKind.LessThanOrEqual || 206condition.OperatorKind == BinaryOperatorKind.NotEquals || 207condition.OperatorKind == BinaryOperatorKind.GreaterThan || 208condition.OperatorKind == BinaryOperatorKind.GreaterThanOrEqual)) 254advanceOperationCode = advanceOperation.OperatorKind; 1516if (binary.OperatorKind == BinaryOperatorKind.Add && binary.OperatorMethod != null && binary.OperatorMethod.Name.Contains("Addition")) 1521if (binary.OperatorKind == BinaryOperatorKind.Multiply && binary.Type.SpecialType == SpecialType.System_Double) 1575binary.OperatorKind.ToString())); 1628binary.OperatorKind.ToString()));
Microsoft.CodeAnalysis.Workspaces (4)
ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
SyntaxGeneratorExtensions_Negate.cs (3)
170if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 176&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 184if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests.vb (2)
67Assert.Equal(add1.OperatorKind, Operations.BinaryOperatorKind.Add) 100Assert.Equal(add2.OperatorKind, Operations.BinaryOperatorKind.Add)