1 implementation of RightOperand
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5659
public IOperation
RightOperand
{ get; }
144 references to RightOperand
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
ILLink.RoslynAnalyzer (3)
DataFlow\FeatureChecksVisitor.cs (2)
114
FeatureChecksValue rightValue = Visit(operation.
RightOperand
, state);
120
if (GetLiteralBool(operation.
RightOperand
) is bool rightBool)
TrimAnalysis\TrimAnalysisVisitor.cs (1)
195
MultiValue rightValue = Visit(operation.
RightOperand
, argument);
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (4)
142
return EvaluateBinaryOperator(symbolCache, binaryOperation.LeftOperand, binaryOperation.
RightOperand
, false) ||
143
EvaluateBinaryOperator(symbolCache, binaryOperation.
RightOperand
, binaryOperation.LeftOperand, false);
148
return EvaluateBinaryOperator(symbolCache, binaryOperation.LeftOperand, binaryOperation.
RightOperand
, true) ||
149
EvaluateBinaryOperator(symbolCache, binaryOperation.
RightOperand
, binaryOperation.LeftOperand, true);
Microsoft.CodeAnalysis (15)
Operations\ControlFlowGraphBuilder.cs (14)
2172
ITypeSymbolHelpers.IsBooleanType(operation.
RightOperand
.Type))
2180
ITypeSymbolHelpers.IsNullableOfBoolean(operation.
RightOperand
.Type))
2187
ITypeSymbolHelpers.IsObjectType(operation.
RightOperand
.Type))
2193
ITypeSymbolHelpers.IsDynamicType(operation.
RightOperand
.Type)))
2228
IOperation rightOperand = VisitRequired(operation.
RightOperand
);
2306
IOperation right = binOp.
RightOperand
;
2413
IOperation right = binOp.
RightOperand
;
2471
IOperation right = binOp.
RightOperand
;
2573
IOperation right = binOp.
RightOperand
;
2679
IOperation resultFromRight = VisitConditionalExpression(condition.
RightOperand
, sense, captureId, fallToTrueOpt, fallToFalseOpt);
2681
CaptureResultIfNotAlready(condition.
RightOperand
.Syntax, captureId, resultFromRight);
2755
ITypeSymbolHelpers.IsBooleanType(binOp.
RightOperand
.Type);
2818
stack.Push((skipParenthesized(binOp.
RightOperand
), top.dest, top.jumpIfTrue));
2827
stack.Push((skipParenthesized(binOp.
RightOperand
), top.dest, top.jumpIfTrue));
Operations\OperationMapBuilder.cs (1)
42
Visit(operation.
RightOperand
, argument);
Microsoft.CodeAnalysis.Analyzers (7)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (4)
141
if (binary.LeftOperand.HasNullConstantValue() || binary.
RightOperand
.HasNullConstantValue())
147
&& !IsSymbolType(binary.
RightOperand
, symbolType))
153
&& (IsSymbolClassType(binary.LeftOperand) || IsSymbolClassType(binary.
RightOperand
)))
158
if (IsExplicitCastToObject(binary.LeftOperand) || IsExplicitCastToObject(binary.
RightOperand
))
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (2)
269
binaryOperation.
RightOperand
.Syntax.WithoutTrailingTrivia()),
277
binaryOperation.
RightOperand
.Syntax.WithoutTrailingTrivia())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (2)
465
if (GetNullAbstractValue(operation.
RightOperand
) == NullAbstractValue.Null)
473
HandlePossibleInvalidatingOperation(operation.
RightOperand
);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (2)
408
if (GetNullAbstractValue(operation.
RightOperand
) == NullAbstractValue.Null)
416
MarkValidatedLocations(operation.
RightOperand
);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (2)
227
var rightValue = Visit(operation.
RightOperand
, argument);
228
return leftValue.MergeBinaryOperation(rightValue, operation.OperatorKind, operation.LeftOperand.Type, operation.
RightOperand
.Type, operation.Type);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (3)
1858
var rightType = operation.
RightOperand
.Type;
1859
var rightConstantValueOpt = operation.
RightOperand
.ConstantValue;
1891
return SetValueForEqualsOrNotEqualsComparisonOperator(operation.LeftOperand, operation.
RightOperand
, equals, isReferenceEquality, targetAnalysisData);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (3)
58
IsLiteralNumber(leftBinary.
RightOperand
) &&
59
TryAddHashedSymbol(topBinary.
RightOperand
, seenHash: true);
96
Unwrap(binary.
RightOperand
).IsNullLiteral() &&
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
73
operation.
RightOperand
,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
167
yield return binaryOperation.
RightOperand
;
169
else if (binaryOperation.
RightOperand
.ConstantValue is { HasValue: true, Value: null })
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
227
binaryOperator.
RightOperand
, out localOrParameter);
230
if (IsNull(binaryOperator.
RightOperand
))
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (5)
191
if (!CSharpSyntaxFacts.Instance.AreEquivalent(lengthOperation.Syntax, subtraction.
RightOperand
.Syntax))
207
if (!CSharpSyntaxFacts.Instance.AreEquivalent(startOperation.Syntax, subtraction.
RightOperand
.Syntax))
245
if (CSharpSyntaxFacts.Instance.AreEquivalent(startOperation.Syntax, subtraction.
RightOperand
.Syntax))
257
IsConstantInt32(subtraction.
RightOperand
) &&
264
startOperation, subtraction.
RightOperand
);
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (6)
80
var rightPattern = ParsePattern(op.
RightOperand
);
89
return (op.LeftOperand, op.
RightOperand
) switch
105
=> new Relational(Flip(op.OperatorKind), left, op.
RightOperand
),
106
ConstantResult.Right when op.
RightOperand
.Syntax is ExpressionSyntax right
117
=> new Constant(left, op.
RightOperand
),
118
ConstantResult.Right when op.
RightOperand
.Syntax is ExpressionSyntax right
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
961
ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.
RightOperand
))
965
else if (binaryOperation.
RightOperand
.Type?.SpecialType == SpecialType.System_Object &&
967
!IsConstantNull(binaryOperation.
RightOperand
) &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
160
RightOperand
: IOperation rightOperand,
670
AreConditionsSatisfiedEitherOrder(binOp.LeftOperand, binOp.
RightOperand
,
740
TryAddEqualizedFieldsForCondition(andOp.
RightOperand
, successRequirement, currentObject, otherObject, builder),
747
TryAddEqualizedFieldsForCondition(orOp.
RightOperand
, successRequirement, currentObject, otherObject, builder),
754
RightOperand
: IMemberReferenceOperation rightMemberReference,
762
RightOperand
: IMemberReferenceOperation rightMemberReference,
806
RightOperand
: IOperation rightOperation,
818
RightOperand
: IOperation rightOperation,
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (3)
160
return (startExpr: null, startFromEnd: false, (ExpressionSyntax)subtraction.
RightOperand
.Syntax, endFromEnd: true);
174
return ((ExpressionSyntax)subtraction.
RightOperand
.Syntax, startFromEnd: true, endExpr: null, endFromEnd: false);
277
rangeOperation = subtraction.
RightOperand
;
Microsoft.CodeAnalysis.CSharp.Features (22)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (5)
191
if (!CSharpSyntaxFacts.Instance.AreEquivalent(lengthOperation.Syntax, subtraction.
RightOperand
.Syntax))
207
if (!CSharpSyntaxFacts.Instance.AreEquivalent(startOperation.Syntax, subtraction.
RightOperand
.Syntax))
245
if (CSharpSyntaxFacts.Instance.AreEquivalent(startOperation.Syntax, subtraction.
RightOperand
.Syntax))
257
IsConstantInt32(subtraction.
RightOperand
) &&
264
startOperation, subtraction.
RightOperand
);
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (6)
80
var rightPattern = ParsePattern(op.
RightOperand
);
89
return (op.LeftOperand, op.
RightOperand
) switch
105
=> new Relational(Flip(op.OperatorKind), left, op.
RightOperand
),
106
ConstantResult.Right when op.
RightOperand
.Syntax is ExpressionSyntax right
117
=> new Constant(left, op.
RightOperand
),
118
ConstantResult.Right when op.
RightOperand
.Syntax is ExpressionSyntax right
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
160
RightOperand
: IOperation rightOperand,
670
AreConditionsSatisfiedEitherOrder(binOp.LeftOperand, binOp.
RightOperand
,
740
TryAddEqualizedFieldsForCondition(andOp.
RightOperand
, successRequirement, currentObject, otherObject, builder),
747
TryAddEqualizedFieldsForCondition(orOp.
RightOperand
, successRequirement, currentObject, otherObject, builder),
754
RightOperand
: IMemberReferenceOperation rightMemberReference,
762
RightOperand
: IMemberReferenceOperation rightMemberReference,
806
RightOperand
: IOperation rightOperation,
818
RightOperand
: IOperation rightOperation,
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (3)
160
return (startExpr: null, startFromEnd: false, (ExpressionSyntax)subtraction.
RightOperand
.Syntax, endFromEnd: true);
174
return ((ExpressionSyntax)subtraction.
RightOperand
.Syntax, startFromEnd: true, endExpr: null, endFromEnd: false);
277
rangeOperation = subtraction.
RightOperand
;
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
961
ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.
RightOperand
))
965
else if (binaryOperation.
RightOperand
.Type?.SpecialType == SpecialType.System_Object &&
967
!IsConstantNull(binaryOperation.
RightOperand
) &&
Microsoft.CodeAnalysis.Features (24)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (13)
215
operation = op.
RightOperand
;
256
return (op.LeftOperand, op.
RightOperand
) switch
290
ConstantResult.Right when op.
RightOperand
.Syntax is TExpressionSyntax right
315
var rightPattern = ParsePattern(op.
RightOperand
, guards);
323
if (Supports(Feature.CaseGuard) && op.
RightOperand
.Syntax is TExpressionSyntax node)
353
ConstantResult.Right when op.
RightOperand
.Syntax is TExpressionSyntax right
378
{ LeftOperand: IBinaryOperation left,
RightOperand
: IBinaryOperation right })
401
LessThanOrEqual when IsConstant(op.LeftOperand) => (BoundKind.Lower, op.
RightOperand
, op.LeftOperand),
403
LessThanOrEqual when IsConstant(op.
RightOperand
) => (BoundKind.Higher, op.LeftOperand, op.
RightOperand
),
405
GreaterThanOrEqual when IsConstant(op.LeftOperand) => (BoundKind.Higher, op.
RightOperand
, op.LeftOperand),
407
GreaterThanOrEqual when IsConstant(op.
RightOperand
) => (BoundKind.Lower, op.LeftOperand, op.
RightOperand
),
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (3)
270
if (IsNullCheck(binaryOperator.LeftOperand, binaryOperator.
RightOperand
, parameter) ||
271
IsNullCheck(binaryOperator.
RightOperand
, binaryOperator.LeftOperand, parameter))
308
IsNumericCheckOperands(binaryOperator.LeftOperand, binaryOperator.
RightOperand
, parameter))
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (3)
58
IsLiteralNumber(leftBinary.
RightOperand
) &&
59
TryAddHashedSymbol(topBinary.
RightOperand
, seenHash: true);
96
Unwrap(binary.
RightOperand
).IsNullLiteral() &&
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
73
operation.
RightOperand
,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
167
yield return binaryOperation.
RightOperand
;
169
else if (binaryOperation.
RightOperand
.ConstantValue is { HasValue: true, Value: null })
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
227
binaryOperator.
RightOperand
, out localOrParameter);
230
if (IsNull(binaryOperator.
RightOperand
))
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
Microsoft.CodeAnalysis.Test.Utilities (12)
Compilation\ControlFlowGraphVerifier.cs (5)
950
(ITypeSymbolHelpers.IsDynamicType(binOp.LeftOperand.Type) || ITypeSymbolHelpers.IsDynamicType(binOp.
RightOperand
.Type)))))
957
binOpSyntax.Right == applyParenthesizedOrNullSuppressionIfAnyCS((CSharpSyntaxNode)binOp.
RightOperand
.Syntax))
968
binOpSyntax.Right == applyParenthesizedIfAnyVB((VisualBasicSyntaxNode)binOp.
RightOperand
.Syntax))
975
range.UpperBound == applyParenthesizedIfAnyVB((VisualBasicSyntaxNode)binOp.
RightOperand
.Syntax))
983
caseStmt.Cases.Contains(applyParenthesizedIfAnyVB((VisualBasicSyntaxNode)binOp.
RightOperand
.Syntax) as CaseClauseSyntax))
Compilation\OperationTreeVerifier.cs (1)
1194
Visit(operation.
RightOperand
, "Right");
Compilation\TestOperationVisitor.cs (1)
791
AssertEx.Equal(new[] { operation.LeftOperand, operation.
RightOperand
}, operation.ChildOperations);
Diagnostics\OperationTestAnalyzer.cs (5)
156
IOperation conditionRight = condition.
RightOperand
;
249
advanceOperation.
RightOperand
.ConstantValue.HasValue &&
250
advanceOperation.
RightOperand
.Type.SpecialType == SpecialType.System_Int32)
253
advanceIncrementOpt = advanceOperation.
RightOperand
.ConstantValue;
1610
var right = binary.
RightOperand
;
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests.vb (2)
72
Dim right1 As IOperation = add1.
RightOperand
106
Dim right2 As IOperation = add2.
RightOperand
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
961
ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.
RightOperand
))
965
else if (binaryOperation.
RightOperand
.Type?.SpecialType == SpecialType.System_Object &&
967
!IsConstantNull(binaryOperation.
RightOperand
) &&
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
415
var rightOperand = RemoveImplicitConversion(binaryOperation.
RightOperand
);