55 references to Method
Microsoft.CodeAnalysis.CSharp (55)
Binder\Binder.cs (2)
626
if (conversion.IsValid && conversion.
Method
is object)
628
ReportDiagnosticsIfObsolete(diagnostics, conversion.
Method
, node, hasBaseReceiver);
Binder\Binder.ValueChecks.cs (6)
3607
conversion.Conversion.
Method
.HasUnsupportedMetadata ||
3608
conversion.Conversion.
Method
.RefKind == RefKind.None));
3977
conversion.Conversion.
Method
.HasUnsupportedMetadata ||
3978
conversion.Conversion.
Method
.RefKind == RefKind.None);
4380
var operatorMethod = conversion.Conversion.
Method
;
5158
var operatorMethod = conversion.Conversion.
Method
;
Binder\Binder_Conversions.cs (3)
305
if (conversion.
Method
is not null)
307
ReportUseSite(conversion.
Method
, diagnostics, syntax.Location);
413
if (conversion.
Method
is MethodSymbol method && method.IsStatic)
Binder\Binder_Deconstruct.cs (2)
150
if (conversion.
Method
!= null)
152
CheckImplicitThisCopyInReadOnlyMember(boundRHS, conversion.
Method
, diagnostics);
Binder\Binder_Expressions.cs (1)
5382
return new BoundDelegateCreationExpression(node, methodGroup, conversion.
Method
, conversion.IsExtensionMethod, wasTargetTyped, type, hasErrors);
Binder\ForEachLoopBinder.cs (2)
547
Debug.Assert((object)collectionConversionClassification.
Method
== null,
549
Debug.Assert((object)currentConversionClassification.
Method
== null,
Binder\Semantics\Conversions\Conversion.cs (7)
588
this.
Method
is object ||
1022
return this.
Method
.GetPublicSymbol();
1183
return this.Kind == other.Kind && this.
Method
== other.
Method
;
1192
return Hash.Combine(this.
Method
, (int)this.Kind);
1226
if (self.
Method
is object)
1228
sub.Add(new TreeDumperNode("method", self.
Method
.ToDisplayString(), null));
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3580
bool result = !_binder.MethodIsCompatibleWithDelegateOrFunctionPointer(node.ReceiverOpt, conv.IsExtensionMethod, conv.
Method
, delegateType, Location.None, BindingDiagnosticBag.Discarded);
Binder\SwitchBinder.cs (1)
418
Debug.Assert(conversion.
Method
.IsUserDefinedConversion());
BoundTree\BoundExpression.cs (1)
465
get { return this.Conversion.
Method
; }
FlowAnalysis\AbstractFlowPass.cs (1)
3011
var method = conversion.
Method
;
FlowAnalysis\NullableWalker.cs (4)
8846
var method = conversion.
Method
;
9378
var method = conversion.
Method
;
10433
if (node.OperandConversion is BoundConversion { Conversion: var operandConversion } && operandConversion.IsUserDefined && operandConversion.
Method
?.ParameterCount == 1)
10435
targetTypeOfOperandConversion = operandConversion.
Method
.ReturnTypeWithAnnotations;
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
791
CheckMethodGroup((BoundMethodGroup)node.Operand, node.Conversion.
Method
, node.IsExtensionMethod, parentIsConversion: true, node.Type);
838
if (_inExpressionLambda && node.Conversion.
Method
is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.IsStatic)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
216
if (conversion.
Method
.MethodKind == MethodKind.LocalFunction)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (16)
535
Debug.Assert(conversion.
Method
is null);
870
Debug.Assert(conversion.
Method
is { });
884
if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.
Method
.GetParameterType(0), TypeCompareKind.ConsiderEverything2))
893
TypeSymbol userDefinedConversionRewrittenType = conversion.
Method
.ReturnType;
899
conversion.
Method
.GetParameterType(0).Equals(rewrittenOperand.Type.GetNullableUnderlyingType(), TypeCompareKind.AllIgnoreOptions) &&
1222
Debug.Assert(conversion.
Method
is { });
1228
conversion.
Method
,
1344
Debug.Assert(conversion.
Method
is { } && !conversion.
Method
.ReturnsVoid && conversion.
Method
.ParameterCount == 1);
1348
var parameterType = conversion.
Method
.GetParameterType(0);
1365
return new BoundReadOnlySpanFromArray(syntax, rewrittenOperand, conversion.
Method
, rewrittenType) { WasCompilerGenerated = true };
1373
conversion.
Method
,
1444
Debug.Assert(conversion.
Method
is { });
1450
conversion.
Method
,
1760
var meth = conversion.
Method
;
Lowering\MethodToClassRewriter.cs (2)
295
if (conversion.
Method
is not null)
297
conversion = conversion.SetConversionMethod(VisitMethodSymbol(conversion.
Method
));
Lowering\SyntheticBoundNodeFactory.cs (3)
1496
if (conversion.
Method
is { } && !TypeSymbol.Equals(conversion.
Method
.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2))
1498
arg = Convert(conversion.
Method
.Parameters[0].Type, arg);