2 writes to Method
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
38this.Method = null; 49this.Method = method;
50 references to Method
Microsoft.CodeAnalysis.CSharp (48)
Binder\Binder_Operators.cs (17)
179CheckConstraintLanguageVersionAndRuntimeSupportForOperator(node, bestSignature.Method, 189bestSignature.Method, 626CheckConstraintLanguageVersionAndRuntimeSupportForOperator(node, signature.Method, 660signature.Method, 699bool isNullableEquality = (object)signature.Method == null && 979_ = CheckConstraintLanguageVersionAndRuntimeSupportForOperator(node, signature.Method, isUnsignedRightShift: false, signature.ConstrainedToTypeOpt, diagnostics) && 988signature.Method, 999Debug.Assert(!(signature.Method?.ContainingType?.IsInterface ?? false)); 1007signature.Method, 1119NamedTypeSymbol t = (NamedTypeSymbol)signature.Method.ContainingType; 1129(t.IsInterface && (signature.Method.IsAbstract || signature.Method.IsVirtual) && 1130SourceUserDefinedOperatorSymbol.IsSelfConstrainedTypeParameter((definition = signature.Method.OriginalDefinition).ReturnType.StrippedType(), definition.ContainingType)); 1137Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1162Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, t); 1304MethodSymbol method = analysisResult.Signature.Method; 1331if (possiblyBest is { HasValue: true, Signature: { Method: { } bestMethod } })
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (9)
811equalsIgnoringNullableAndDynamic(op.Signature.Method.ContainingType, existingSignature.Method.ContainingType)) 921if (SourceMemberContainerTypeSymbol.DoOperatorsPair(signature1.Method, operators2[i].Method)) 958MethodSymbol op = operators[i].Method; 1293if ((object)op1.Method != null) 1295var p = op1.Method.OriginalDefinition.GetParameters(); 1310if ((object)op2.Method != null) 1312var p = op2.Method.OriginalDefinition.GetParameters();
Binder\Semantics\Operators\BinaryOperatorSignature.cs (13)
66this.Method == other.Method; 89Hash.Combine(Method, (int)Kind)))); 96if ((object)Method != null) 98Debug.Assert(Method.ParameterCount == 2); 100if (!Method.ParameterRefKinds.IsDefaultOrEmpty) 102Debug.Assert(Method.ParameterRefKinds.Length == 2); 104return Method.ParameterRefKinds[0]; 116if ((object)Method != null) 118Debug.Assert(Method.ParameterCount == 2); 120if (!Method.ParameterRefKinds.IsDefaultOrEmpty) 122Debug.Assert(Method.ParameterRefKinds.Length == 2); 124return Method.ParameterRefKinds[1];
BoundTree\BoundExpression.cs (1)
398get { return this.Operator.Method; }
Compilation\CSharpSemanticModel.cs (2)
3911GetSymbolsAndResultKind(compoundAssignment, compoundAssignment.Operator.Method, compoundAssignment.OriginalUserDefinedOperatorsOpt, out symbols, out resultKind); 3916Debug.Assert((object)compoundAssignment.Operator.Method == null && compoundAssignment.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty);
FlowAnalysis\NullableWalker.cs (4)
9667if (node.Operator.Kind.IsUserDefined() && (object)node.Operator.Method != null && node.Operator.Method.ParameterCount == 2) 9669MethodSymbol method = node.Operator.Method; 9674resultType = InferResultNullability(node.Operator.Kind, node.Operator.Method, node.Operator.ReturnType, leftOnRightType, rightType);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
142BoundExpression operand = MakeBinaryOperator(syntax, node.Operator.Kind, opLHS, loweredRight, node.Operator.ReturnType, node.Operator.Method, node.Operator.ConstrainedToTypeOpt, isCompoundAssignment: true);
Operations\CSharpOperationFactory.cs (1)
1296var method = boundCompoundAssignmentOperator.Operator.Method;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\OperatorTests.cs (2)
8827Assert.Null(op.Method); 8829Assert.Equal(op, new BinaryOperatorSignature(op.Kind, op.LeftType, op.RightType, op.ReturnType, op.Method, constrainedToTypeOpt: null));