1 write to Method
Microsoft.CodeAnalysis.CSharp (1)
Binder\MethodArgumentInfo.cs (1)
28
this.
Method
= method;
60 references to Method
Microsoft.CodeAnalysis.CSharp (60)
Binder\ForEachEnumeratorInfo.cs (3)
157
var getEnumeratorMethod = this.GetEnumeratorInfo?.
Method
;
159
var moveNextMethod = this.MoveNextInfo?.
Method
;
165
if (this.NeedsDisposal && this.PatternDisposeInfo?.
Method
is null &&
Binder\ForEachLoopBinder.cs (23)
234
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo?.
Method
;
263
var placeholder = new BoundAwaitableValuePlaceholder(expr, builder.MoveNextInfo?.
Method
.ReturnType ?? CreateErrorType());
472
ReportDiagnosticsIfObsolete(diagnostics, builder.MoveNextInfo.
Method
, foreachKeyword, hasBaseReceiver: false);
475
Debug.Assert(!IsDisallowedExtensionInOlderLangVer(builder.MoveNextInfo.
Method
));
591
builder.GetEnumeratorInfo.
Method
.IsExtensionMethod ||
592
builder.GetEnumeratorInfo.
Method
.IsExtensionBlockMember())) ||
617
: builder.PatternDisposeInfo.
Method
.ReturnType;
1039
Debug.Assert(!(viaExtensionMethod && builder.GetEnumeratorInfo.
Method
.IsExtensionMethod && builder.GetEnumeratorInfo.
Method
.Parameters.IsDefaultOrEmpty));
1040
Debug.Assert(!(viaExtensionMethod && !builder.GetEnumeratorInfo.
Method
.IsExtensionMethod && !builder.GetEnumeratorInfo.
Method
.IsExtensionBlockMember()));
1046
if (builder.GetEnumeratorInfo.
Method
.IsExtensionMethod)
1048
builder.CollectionType = builder.GetEnumeratorInfo.
Method
.Parameters[0].Type;
1052
builder.CollectionType = builder.GetEnumeratorInfo.
Method
.ContainingType.ExtensionParameter.Type;
1069
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.
Method
;
1194
builder.GetEnumeratorInfo.
Method
.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator);
1209
TypeSymbol enumeratorType = builder.GetEnumeratorInfo.
Method
.ReturnType;
1330
TypeSymbol.Equals(builder.GetEnumeratorInfo.
Method
.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2));
1648
Debug.Assert((object)builder.GetEnumeratorInfo.
Method
!= null);
1650
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.
Method
;
1736
moveNextMethodCandidate.
Method
.IsStatic || moveNextMethodCandidate.
Method
.DeclaredAccessibility != Accessibility.Public ||
1737
IsInvalidMoveNextMethod(moveNextMethodCandidate.
Method
, isAsync))
Binder\RefSafetyAnalysis.cs (1)
1304
resultType: node.EnumeratorInfoOpt.GetEnumeratorInfo.
Method
.ContainingType,
Compilation\MemberSemanticModel.cs (3)
1018
if (enumeratorInfoOpt.PatternDisposeInfo is {
Method
: var method })
1032
enumeratorInfoOpt.GetEnumeratorInfo.
Method
.GetPublicSymbol(),
1033
enumeratorInfoOpt.MoveNextInfo.
Method
.GetPublicSymbol(),
FlowAnalysis\NullableWalker.cs (9)
3689
VisitAwaitableInfoForUsing(node.AwaitOpt, node.PatternDisposeInfoOpt?.
Method
);
3695
VisitAwaitableInfoForUsing(node.AwaitOpt, node.PatternDisposeInfoOpt?.
Method
);
12550
&& (enumeratorMethodInfo.
Method
.IsExtensionMethod || enumeratorMethodInfo.
Method
.IsExtensionBlockMember()))
12560
method: enumeratorMethodInfo.
Method
,
12621
bool reportedDiagnostic = enumeratorInfoOpt?.GetEnumeratorInfo.
Method
is { } getEnumeratorMethod
12666
reinferredGetEnumeratorMethod = (MethodSymbol)AsMemberOfType(getEnumeratorType, enumeratorInfoOpt.GetEnumeratorInfo.
Method
);
12688
var moveNextAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, enumeratorInfoOpt.MoveNextInfo.
Method
);
12699
var patternDisposeMethod = enumeratorInfoOpt.PatternDisposeInfo?.
Method
;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
182
if (!ShouldUseIEnumerableBulkAddMethod(singleSpread.Expression.Type, toListOfElementType.Parameters[0].Type, singleSpread.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
852
&& ShouldUseIEnumerableBulkAddMethod(spreadExpression.Type!, linqToArrayMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
1420
if (!ShouldUseIEnumerableBulkAddMethod(rewrittenSpreadOperand.Type, addRangeMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (5)
158
TypeSymbol enumeratorType = getEnumeratorInfo.
Method
.ReturnType;
166
var receiver = ConvertReceiverForInvocation(forEachSyntax, rewrittenExpression, getEnumeratorInfo.
Method
, convertedCollection.Conversion, enumeratorInfo.CollectionType);
171
if (getEnumeratorInfo.
Method
.IsExtensionMethod)
178
getEnumeratorInfo.
Method
,
333
MethodSymbol? disposeMethod = enumeratorInfo.PatternDisposeInfo?.
Method
; // pattern-based
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
445
MethodSymbol? disposeMethod = disposeInfo?.
Method
;
494
MethodSymbol method = methodArgumentInfo.
Method
;
Operations\CSharpOperationFactory.cs (11)
1987
enumeratorInfoOpt.GetEnumeratorInfo.
Method
.GetPublicSymbol(),
1989
enumeratorInfoOpt.MoveNextInfo.
Method
.GetPublicSymbol(),
1996
HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorInfoOpt.GetEnumeratorInfo.
Method
.ReturnType,
2001
enumeratorInfoOpt.PatternDisposeInfo?.
Method
.GetPublicSymbol(),
2028
info.
Method
,
2032
invokedAsExtensionMethod: info.
Method
.IsExtensionMethod
2124
disposeMethod: boundUsingStatement.PatternDisposeInfoOpt.
Method
.GetPublicSymbol(),
2263
disposeMethod: usingDecl.PatternDisposeInfoOpt.
Method
.GetPublicSymbol(),
3028
Debug.Assert(!patternDisposeInfo.
Method
.IsStatic);
3030
if (patternDisposeInfo.
Method
.ParameterCount == 0)
3036
patternDisposeInfo.
Method
,