2 writes to Method
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
38this.Method = null; 49this.Method = method;
77 references to Method
Microsoft.CodeAnalysis.CSharp (77)
Binder\Binder.ValueChecks.cs (4)
3717(compoundAssignmentOperator.Operator.Method is not { } compoundMethod || 4087(compoundAssignmentOperator.Operator.Method is not { } compoundMethod || 4498if (compound.Operator.Method is { } compoundMethod) 5292if (compound.Operator.Method is { } compoundMethod)
Binder\Binder_Operators.cs (24)
186if (best.Signature.Method is { } bestMethod) 238CheckConstraintLanguageVersionAndRuntimeSupportForOperator(node, bestSignature.Method, 248bestSignature.Method, 1019CheckConstraintLanguageVersionAndRuntimeSupportForOperator(node, signature.Method, 1083signature.Method, 1124if (signature.Method is { } bestMethod) 1138bool isNullableEquality = (object)signature.Method == null && 1410if (signature.Method is { } bestMethod) 1439_ = CheckConstraintLanguageVersionAndRuntimeSupportForOperator(node, signature.Method, isUnsignedRightShift: false, signature.ConstrainedToTypeOpt, diagnostics) && 1463signature.Method, 1478Debug.Assert(!(signature.Method?.ContainingType?.IsInterface ?? false)); 1486signature.Method, 1582Debug.Assert(signature.Method is not null); 1584if (signature.Method.GetIsNewExtensionMember()) 1642NamedTypeSymbol t = (NamedTypeSymbol)signature.Method.ContainingType; 1652(t.IsInterface && (signature.Method.IsAbstract || signature.Method.IsVirtual) && 1653SourceUserDefinedOperatorSymbol.IsSelfConstrainedTypeParameter((definition = signature.Method.OriginalDefinition).ReturnType.StrippedType(), definition.ContainingType)); 1660Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1685Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, t); 1784Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1798NamespaceSymbol.AddExtensionContainersInType(signature.Method.OriginalDefinition.ContainingType.ContainingType, extensions); 1814Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, signature.Method.OriginalDefinition.ContainingType.ContainingType);
Binder\RefSafetyAnalysis.cs (1)
552if (!node.HasErrors && node.Operator.Method is { } compoundMethod)
Binder\Semantics\Operators\BinaryOperatorAnalysisResult.cs (1)
40MethodSymbol IMemberResolutionResultWithPriority<MethodSymbol>.MemberWithPriority => Signature.Method;
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (14)
973if (SourceMemberContainerTypeSymbol.DoOperatorsPair(signature1.Method, operators2[i].Method)) 1268if (op1.Method?.GetMemberArityIncludingExtension() is null or 0) 1270if (op2.Method?.GetMemberArityIncludingExtension() > 0) 1275else if (op2.Method?.GetMemberArityIncludingExtension() is null or 0) 1367if ((object)op1.Method != null) 1369var p = op1.Method.OriginalDefinition.GetParameters(); 1384if ((object)op2.Method != null) 1386var p = op2.Method.OriginalDefinition.GetParameters(); 1586Debug.Assert(candidate.Method.ContainingType.ExtensionParameter is not null); 1603var method = candidate.Method.OriginalDefinition; 1613Debug.Assert(candidate.Method.ContainingType.ExtensionParameter is not null); 1617if (!candidate.Method.ContainingType.ExtensionParameter.Type.IsValidNullableTypeArgument() || 1618!Conversions.ConvertExtensionMethodThisArg(MakeNullable(candidate.Method.ContainingType.ExtensionParameter.Type), operand.Type, ref useSiteInfo, isMethodGroupConversion: false).Exists) 1623else if (!Conversions.ConvertExtensionMethodThisArg(candidate.Method.ContainingType.ExtensionParameter.Type, operand.Type, ref useSiteInfo, isMethodGroupConversion: false).Exists)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (15)
66Symbol.Equals(this.Method, other.Method, TypeCompareKind.ConsiderEverything); 89Hash.Combine(Method, (int)Kind)))); 96if ((object)Method != null && Method.IsStatic) 98Debug.Assert(Method.ParameterCount == 2); 100if (!Method.ParameterRefKinds.IsDefaultOrEmpty) 102Debug.Assert(Method.ParameterRefKinds.Length == 2); 104return Method.ParameterRefKinds[0]; 116if ((object)Method != null) 118int rightIndex = Method.IsStatic ? 1 : 0; 120Debug.Assert(Method.ParameterCount == rightIndex + 1); 122if (!Method.ParameterRefKinds.IsDefaultOrEmpty) 124Debug.Assert(Method.ParameterRefKinds.Length == rightIndex + 1); 126return Method.ParameterRefKinds[rightIndex];
BoundTree\BoundExpression.cs (1)
454get { return this.Operator.Method; }
BoundTree\NullabilityRewriter.cs (2)
150if (op.Method is not null) 152op = new BinaryOperatorSignature(op.Kind, op.LeftType, op.RightType, op.ReturnType, GetUpdatedSymbol(node, op.Method), op.ConstrainedToTypeOpt);
Compilation\CSharpSemanticModel.cs (2)
3935GetSymbolsAndResultKind(compoundAssignment, compoundAssignment.Operator.Method, compoundAssignment.OriginalUserDefinedOperatorsOpt, out symbols, out resultKind); 3940Debug.Assert((object)compoundAssignment.Operator.Method == null && compoundAssignment.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty);
FlowAnalysis\NullableWalker.cs (4)
11118if (node.Operator.Method is { } method ? 11122if (node.Operator.Method is { } instanceMethod) 11162SetUpdatedSymbol(node, node.Operator.Method, instanceMethod); 11207node.Operator.Method,
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
278!(node.Operator.Method is { IsStatic: false } method && method.GetIsNewExtensionMember()))
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (7)
26if (node.Operator.Method?.IsStatic == false) 38Debug.Assert(node.Operator.Method is { }); 39Debug.Assert(node.LeftConversion is null || (node.Left.Type!.IsReferenceType && node.Operator.Method.GetIsNewExtensionMember())); 49node.Operator.Method, 70node.Operator.Method, 79return MakeInstanceCompoundAssignmentOperatorResult(node.Syntax, node.Left, node.Right, node.Operator.Method, node.Operator.Kind.IsChecked()); 213operand = MakeBinaryOperator(syntax, node.Operator.Kind, opLHS, loweredRight, node.Operator.ReturnType, node.Operator.Method, node.Operator.ConstrainedToTypeOpt, isCompoundAssignment: true);
Operations\CSharpOperationFactory.cs (1)
1363var method = boundCompoundAssignmentOperator.Operator.Method;