1 implementation of OperatorKind
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5697public BinaryOperatorKind OperatorKind { get; }
185 references to OperatorKind
GenerateDocumentationAndConfigFiles (5)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
245=> binaryOperation.OperatorKind switch
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
149if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 155&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 163if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
ILLink.RoslynAnalyzer (2)
DataFlow\FeatureChecksVisitor.cs (1)
100switch (operation.OperatorKind)
TrimAnalysis\TrimAnalysisVisitor.cs (1)
200operation.OperatorKind == BinaryOperatorKind.Or &&
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (2)
139if (binaryOperation.OperatorKind == BinaryOperatorKind.Equals) 145else if (binaryOperation.OperatorKind == BinaryOperatorKind.NotEquals)
Microsoft.CodeAnalysis (4)
Operations\ControlFlowGraphBuilder.cs (4)
2164switch (operation.OperatorKind) 2240leftOperand = PopStackFrame(frame, new BinaryOperation(operation.OperatorKind, PopOperand(), rightOperand, operation.IsLifted, operation.IsChecked, operation.IsCompareText, 2281switch (binOp.OperatorKind) 2291throw ExceptionUtilities.UnexpectedValue(binOp.OperatorKind);
Microsoft.CodeAnalysis.Analyzers (13)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
128if (binary.OperatorKind is not BinaryOperatorKind.Equals and not BinaryOperatorKind.NotEquals)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
280if (binaryOperation.OperatorKind == BinaryOperatorKind.NotEquals)
MetaAnalyzers\PreferIsKindAnalyzer.cs (1)
73if (operation.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals))
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
208countBinaryOperator(operation, ((IBinaryOperation)operation).OperatorKind);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
337return binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalAnd || 338binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalOr || 340(binaryOperation.OperatorKind == BinaryOperatorKind.Or || binaryOperation.OperatorKind == BinaryOperatorKind.And));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
245=> binaryOperation.OperatorKind switch
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
149if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 155&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 163if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
Microsoft.CodeAnalysis.AnalyzerUtilities (17)
src\1e7e9f16bf7f1945\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (1)
228return leftValue.MergeBinaryOperation(rightValue, operation.OperatorKind, operation.LeftOperand.Type, operation.RightOperand.Type, operation.Type);
src\683181b2796de991\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (4)
396(operation.OperatorKind == BinaryOperatorKind.NotEquals || operation.OperatorKind == BinaryOperatorKind.ObjectValueNotEquals); 404(operation.OperatorKind == BinaryOperatorKind.Equals || operation.OperatorKind == BinaryOperatorKind.ObjectValueEquals);
src\a172c07bebba4cd8\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (4)
453(operation.OperatorKind == BinaryOperatorKind.Equals || operation.OperatorKind == BinaryOperatorKind.ObjectValueEquals); 461(operation.OperatorKind == BinaryOperatorKind.NotEquals || operation.OperatorKind == BinaryOperatorKind.ObjectValueNotEquals);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
208countBinaryOperator(operation, ((IBinaryOperation)operation).OperatorKind);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
337return binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalAnd || 338binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalOr || 340(binaryOperation.OperatorKind == BinaryOperatorKind.Or || binaryOperation.OperatorKind == BinaryOperatorKind.And));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
245=> binaryOperation.OperatorKind switch
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1870switch (operation.OperatorKind)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
Microsoft.CodeAnalysis.CodeStyle (7)
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
99if (binary.OperatorKind == BinaryOperatorKind.Equals) 105else if (binary.OperatorKind == BinaryOperatorKind.NotEquals)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
65if (operation.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals)) 68var isOperatorEquals = operation.OperatorKind == BinaryOperatorKind.Equals;
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
163if (current is IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals } binaryOperation)
src\roslyn\src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
219if (binaryOperator.OperatorKind != BinaryOperatorKind.Equals)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
149if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 155&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 163if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
55if (operation is IBinaryOperation { OperatorKind: BinaryOperatorKind.Subtract } binaryOperation)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (7)
43case IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } op: 46case IBinaryOperation { OperatorKind: NotEquals } op: 49case IBinaryOperation { OperatorKind: ConditionalOr, Syntax: BinaryExpressionSyntax syntax } op: 52case IBinaryOperation { OperatorKind: ConditionalAnd, Syntax: BinaryExpressionSyntax syntax } op: 55case IBinaryOperation op when IsRelationalOperator(op.OperatorKind): 105=> new Relational(Flip(op.OperatorKind), left, op.RightOperand), 107=> new Relational(op.OperatorKind, right, op.LeftOperand),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1071ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.RightOperand)) 1078ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
158OperatorKind: BinaryOperatorKind.Equals, 667return binOp.OperatorKind == expectedKind && 738(true, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalAnd } andOp) 745(false, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalOr } orOp) 752OperatorKind: BinaryOperatorKind.Equals, 760OperatorKind: BinaryOperatorKind.NotEquals, 804OperatorKind: BinaryOperatorKind.ConditionalAnd, 816OperatorKind: BinaryOperatorKind.ConditionalOr,
Microsoft.CodeAnalysis.CSharp.Features (16)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
55if (operation is IBinaryOperation { OperatorKind: BinaryOperatorKind.Subtract } binaryOperation)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (7)
43case IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } op: 46case IBinaryOperation { OperatorKind: NotEquals } op: 49case IBinaryOperation { OperatorKind: ConditionalOr, Syntax: BinaryExpressionSyntax syntax } op: 52case IBinaryOperation { OperatorKind: ConditionalAnd, Syntax: BinaryExpressionSyntax syntax } op: 55case IBinaryOperation op when IsRelationalOperator(op.OperatorKind): 105=> new Relational(Flip(op.OperatorKind), left, op.RightOperand), 107=> new Relational(op.OperatorKind, right, op.LeftOperand),
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
158OperatorKind: BinaryOperatorKind.Equals, 667return binOp.OperatorKind == expectedKind && 738(true, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalAnd } andOp) 745(false, IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalOr } orOp) 752OperatorKind: BinaryOperatorKind.Equals, 760OperatorKind: BinaryOperatorKind.NotEquals, 804OperatorKind: BinaryOperatorKind.ConditionalAnd, 816OperatorKind: BinaryOperatorKind.ConditionalOr,
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Runtime\CSharpUseSpanBasedStringConcat.cs (1)
21return operation.OperatorKind == BinaryOperatorKind.Add &&
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1071ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.RightOperand)) 1078ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))
Microsoft.CodeAnalysis.Features (16)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (9)
209if (operation is IBinaryOperation { OperatorKind: ConditionalOr } op) 282case IBinaryOperation { OperatorKind: ConditionalAnd } op 286case IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } op: 296case IBinaryOperation { OperatorKind: NotEquals } op 301when Supports(Feature.RelationalPattern) && IsRelationalOperator(op.OperatorKind): 306case IBinaryOperation { OperatorKind: ConditionalAnd } op 353=> new AnalyzedPattern.Relational(Flip(op.OperatorKind), left), 355=> new AnalyzedPattern.Relational(op.OperatorKind, right), 399return op.OperatorKind switch
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
307if (condition is IBinaryOperation { OperatorKind: BinaryOperatorKind.LessThan or BinaryOperatorKind.LessThanOrEqual or BinaryOperatorKind.GreaterThan or BinaryOperatorKind.GreaterThanOrEqual } binaryOperator &&
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
99if (binary.OperatorKind == BinaryOperatorKind.Equals) 105else if (binary.OperatorKind == BinaryOperatorKind.NotEquals)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
65if (operation.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals)) 68var isOperatorEquals = operation.OperatorKind == BinaryOperatorKind.Equals;
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
163if (current is IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals } binaryOperation)
src\roslyn\src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
219if (binaryOperator.OperatorKind != BinaryOperatorKind.Equals)
Microsoft.CodeAnalysis.NetAnalyzers (55)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumShouldNotHaveDuplicatedValues.cs (1)
123case IBinaryOperation { OperatorKind: not BinaryOperatorKind.Or }:
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidLengthCalculationWhenSlicingToEnd.cs (2)
96IBinaryOperation { OperatorKind: BinaryOperatorKind.Add or BinaryOperatorKind.Subtract } binaryOperation 139AddExpressionPartToSet(binaryOperation.RightOperand, binaryOperation.OperatorKind == BinaryOperatorKind.Subtract ? !isNegated : isNegated, set);
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (6)
1775(bo.OperatorKind == BinaryOperatorKind.Equals || 1776bo.OperatorKind == BinaryOperatorKind.NotEquals || 1777bo.OperatorKind == BinaryOperatorKind.GreaterThan || 1778bo.OperatorKind == BinaryOperatorKind.LessThan || 1779bo.OperatorKind == BinaryOperatorKind.GreaterThanOrEqual || 1780bo.OperatorKind == BinaryOperatorKind.LessThanOrEqual);
Microsoft.NetCore.Analyzers\Performance\PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.cs (2)
293case IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalAnd } bAnd when guardsTruePath: 303case IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalOr } bOr when !guardsTruePath:
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Analyzer.cs (1)
300if (binaryOperation.OperatorKind is not BinaryOperatorKind.Equals and not BinaryOperatorKind.NotEquals)
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Fixer.cs (1)
207var replacement = binaryOperation.OperatorKind == BinaryOperatorKind.NotEquals ?
Microsoft.NetCore.Analyzers\Performance\UseCountProperly.cs (4)
573switch (binaryOperation.OperatorKind) 589switch (binaryOperation.OperatorKind) 621switch (binaryOperation.OperatorKind) 639switch (binaryOperation.OperatorKind)
Microsoft.NetCore.Analyzers\Performance\UseStartsWithInsteadOfIndexOfComparisonWithZero.cs (2)
99if (binaryOperation.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals)) 107if (binaryOperation.OperatorKind == BinaryOperatorKind.NotEquals)
Microsoft.NetCore.Analyzers\Runtime\LoggerMessageDefineAnalyzer.cs (1)
258case IBinaryOperation { OperatorKind: BinaryOperatorKind.Add } binary:
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOf.Fixer.cs (1)
125SyntaxNode newIfCondition = binaryOperation.OperatorKind == BinaryOperatorKind.Equals && (int)otherOperation.ConstantValue.Value! == -1 ?
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOfAnalyzer.cs (1)
176var operatorKind = binaryOperation.OperatorKind;
Microsoft.NetCore.Analyzers\Runtime\TestForEmptyStringsUsingStringLength.cs (1)
102if (binaryOperation.OperatorKind is not BinaryOperatorKind.Equals and
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectly.cs (1)
55if (!_comparisonOperators.Contains(binaryOperatorExpression.OperatorKind))
Microsoft.NetCore.Analyzers\Runtime\UseExceptionThrowHelpers.cs (9)
376else if (condition is IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } equalsOp) 407else if (condition is IBinaryOperation { OperatorKind: BinaryOperatorKind.ConditionalOr } orOp && 409orOp.RightOperand is IBinaryOperation { OperatorKind: BinaryOperatorKind.Equals } lengthCheckOperation) 473switch (binaryOperation.OperatorKind) 500methodName = binaryOperation.OperatorKind == BinaryOperatorKind.LessThanOrEqual ? ThrowIfNegativeOrZero : ThrowIfNegative; 513methodName = binaryOperation.OperatorKind == BinaryOperatorKind.GreaterThanOrEqual ? ThrowIfNegativeOrZero : ThrowIfNegative; 539switch (binaryOperation.OperatorKind) 550methodName = binaryOperation.OperatorKind switch 572methodName = binaryOperation.OperatorKind switch
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.cs (2)
136_operatorKind = operation.OperatorKind; 138else if (_operatorKind != operation.OperatorKind)
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.Fixer.cs (1)
52|| concatOperation.OperatorKind is not (BinaryOperatorKind.Add or BinaryOperatorKind.Concatenate))
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.cs (1)
183if (binaryOperation?.OperatorKind is not (BinaryOperatorKind.Equals or BinaryOperatorKind.NotEquals))
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.Fixer.cs (1)
129return b.OperatorKind is BinaryOperatorKind.NotEquals
src\440320f3f10733a8\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (1)
227return leftValue.MergeBinaryOperation(rightValue, operation.OperatorKind, operation.LeftOperand.Type, operation.RightOperand.Type, operation.Type);
src\47c588c5b8785708\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (4)
394(operation.OperatorKind == BinaryOperatorKind.NotEquals || operation.OperatorKind == BinaryOperatorKind.ObjectValueNotEquals); 402(operation.OperatorKind == BinaryOperatorKind.Equals || operation.OperatorKind == BinaryOperatorKind.ObjectValueEquals);
src\afc74d572e54ec72\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (4)
450(operation.OperatorKind == BinaryOperatorKind.Equals || operation.OperatorKind == BinaryOperatorKind.ObjectValueEquals); 458(operation.OperatorKind == BinaryOperatorKind.NotEquals || operation.OperatorKind == BinaryOperatorKind.ObjectValueNotEquals);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
210countBinaryOperator(operation, ((IBinaryOperation)operation).OperatorKind);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
339return binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalAnd || 340binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalOr || 342(binaryOperation.OperatorKind == BinaryOperatorKind.Or || binaryOperation.OperatorKind == BinaryOperatorKind.And));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
398=> binaryOperation.OperatorKind switch 419switch (binaryOperation.OperatorKind)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1867switch (operation.OperatorKind)
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
208countBinaryOperator(operation, ((IBinaryOperation)operation).OperatorKind);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
337return binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalAnd || 338binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalOr || 340(binaryOperation.OperatorKind == BinaryOperatorKind.Or || binaryOperation.OperatorKind == BinaryOperatorKind.And));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
245=> binaryOperation.OperatorKind switch
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Runtime\BasicUseSpanBasedStringConcat.vb (1)
30Return operation.OperatorKind = BinaryOperatorKind.Concatenate
Microsoft.CodeAnalysis.Workspaces (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
149if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 155&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 163if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
Roslyn.Diagnostics.Analyzers (10)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
208countBinaryOperator(operation, ((IBinaryOperation)operation).OperatorKind);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
337return binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalAnd || 338binaryOperation.OperatorKind == BinaryOperatorKind.ConditionalOr || 340(binaryOperation.OperatorKind == BinaryOperatorKind.Or || binaryOperation.OperatorKind == BinaryOperatorKind.And));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
245=> binaryOperation.OperatorKind switch
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
86return op.OperatorKind is BinaryOperatorKind.Add or
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
149if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind)) 155&& binaryOperation.OperatorKind is BinaryOperatorKind.LessThan or 163if (binaryOperation.OperatorKind is BinaryOperatorKind.Or or
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1071ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.RightOperand)) 1078ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))