1 implementation of OperatorMethod
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5663public IMethodSymbol? OperatorMethod { get; }
37 references to OperatorMethod
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimAnalysisVisitor.cs (1)
187 operation.OperatorMethod is null &&
Microsoft.CodeAnalysis (12)
Generated\Operations.Generated.cs (1)
1136/// Type parameter which runtime type will be used to resolve virtual invocation of the <see cref="OperatorMethod" />
Operations\ControlFlowGraphBuilder.cs (11)
2168if (operation.OperatorMethod == null) 2231operation.OperatorMethod, operation.ConstrainedToType, ((BinaryOperation)operation).UnaryOperatorMethod, 2545binOp.OperatorMethod, 2546binOp.OperatorMethod is not null && (binOp.OperatorMethod.IsAbstract || binOp.OperatorMethod.IsVirtual) ? binOp.ConstrainedToType : null, 2564Debug.Assert(binOp.OperatorMethod is not null); 2635binOp.OperatorMethod, 2636binOp.OperatorMethod.IsAbstract || binOp.OperatorMethod.IsVirtual ? binOp.ConstrainedToType : null, 2752binOp.OperatorMethod == null &&
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
62if (operation.OperatorMethod is not null)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (4)
155if (operation.OperatorMethod is null || 156operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.IncrementOperatorName).Length > 0) 175if (operation.OperatorMethod is null || 176operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.DecrementOperatorName).Length > 0)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1411if (operation is IBinaryOperation { OperatorMethod: not null })
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1411if (operation is IBinaryOperation { OperatorMethod: not null })
Microsoft.CodeAnalysis.Features (5)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
62if (operation.OperatorMethod is not null)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (4)
155if (operation.OperatorMethod is null || 156operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.IncrementOperatorName).Length > 0) 175if (operation.OperatorMethod is null || 176operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.DecrementOperatorName).Length > 0)
Microsoft.CodeAnalysis.Test.Utilities (9)
Compilation\ControlFlowGraphVerifier.cs (2)
948(binOp.OperatorMethod != null || 1877(binary.OperatorMethod == null &&
Compilation\OperationTreeVerifier.cs (1)
1207LogHasOperatorMethodExpressionCommon(operation.OperatorMethod, operation.ConstrainedToType);
Compilation\TestOperationVisitor.cs (1)
764var operatorMethod = operation.OperatorMethod;
Diagnostics\OperationTestAnalyzer.cs (5)
246if (advanceOperation.OperatorMethod == null && 1516if (binary.OperatorKind == BinaryOperatorKind.Add && binary.OperatorMethod != null && binary.OperatorMethod.Name.Contains("Addition")) 1570if (binary.OperatorMethod != null) 1613binary.OperatorMethod == null)
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (3)
IOperation\IOperationTests.vb (3)
68Assert.Null(add1.OperatorMethod) 101Assert.NotNull(add2.OperatorMethod) 102Assert.Equal(add2.OperatorMethod.Name, "op_Addition")