1 implementation of OperatorMethod
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5663public IMethodSymbol? OperatorMethod { get; }
47 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.Analyzers (4)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
134if (binary.OperatorMethod?.ContainingSymbol is INamedTypeSymbol containingType
src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (3)
118if (binary.OperatorMethod != null) 120VerifySymbol(context.ReportDiagnostic, binary.OperatorMethod, context.Operation.Syntax); 121VerifyType(context.ReportDiagnostic, binary.OperatorMethod.ContainingType, context.Operation.Syntax);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1858var isReferenceEquality = operation.OperatorMethod == null &&
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
RestrictedInternalsVisibleToAnalyzer.cs (1)
95IBinaryOperation binary => binary.OperatorMethod,
SymbolIsBannedAnalyzerBase.cs (3)
118if (binary.OperatorMethod != null) 120VerifySymbol(context.ReportDiagnostic, binary.OperatorMethod, context.Operation.Syntax); 121VerifyType(context.ReportDiagnostic, binary.OperatorMethod.ContainingType, context.Operation.Syntax);
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)
1449if (operation is IBinaryOperation { OperatorMethod: not null })
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1449if (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")
Roslyn.Diagnostics.Analyzers (1)
AbstractDoNotCopyValue.cs (1)
439CheckMethodSymbolInUnsupportedContext(operation, operation.OperatorMethod);