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