1 write to Method
Microsoft.CodeAnalysis.CSharp (1)
Binder\MethodArgumentInfo.cs (1)
28
this.
Method
= method;
53 references to Method
Microsoft.CodeAnalysis.CSharp (53)
Binder\ForEachLoopBinder.cs (18)
234
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo?.
Method
;
255
var placeholder = new BoundAwaitableValuePlaceholder(expr, builder.MoveNextInfo?.
Method
.ReturnType ?? CreateErrorType());
461
ReportDiagnosticsIfObsolete(diagnostics, builder.MoveNextInfo.
Method
, foreachKeyword, hasBaseReceiver: false);
571
builder.GetEnumeratorInfo.
Method
.IsExtensionMethod)) ||
597
: builder.PatternDisposeInfo.
Method
.ReturnType;
862
Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.
Method
.IsExtensionMethod);
909
Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.
Method
.IsExtensionMethod);
1020
Debug.Assert(!(viaExtensionMethod && builder.GetEnumeratorInfo.
Method
.Parameters.IsDefaultOrEmpty));
1024
? builder.GetEnumeratorInfo.
Method
.Parameters[0].Type
1036
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.
Method
;
1166
builder.GetEnumeratorInfo.
Method
.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator);
1192
TypeSymbol enumeratorType = builder.GetEnumeratorInfo.
Method
.ReturnType;
1305
TypeSymbol.Equals(builder.GetEnumeratorInfo.
Method
.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2));
1594
Debug.Assert((object)builder.GetEnumeratorInfo.
Method
!= null);
1596
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.
Method
;
1682
moveNextMethodCandidate.
Method
.IsStatic || moveNextMethodCandidate.
Method
.DeclaredAccessibility != Accessibility.Public ||
1683
IsInvalidMoveNextMethod(moveNextMethodCandidate.
Method
, isAsync))
Binder\RefSafetyAnalysis.cs (1)
1055
resultType: node.EnumeratorInfoOpt.GetEnumeratorInfo.
Method
.ContainingType,
Compilation\MemberSemanticModel.cs (3)
974
if (enumeratorInfoOpt.PatternDisposeInfo is {
Method
: var method })
988
enumeratorInfoOpt.GetEnumeratorInfo.
Method
.GetPublicSymbol(),
989
enumeratorInfoOpt.MoveNextInfo.
Method
.GetPublicSymbol(),
FlowAnalysis\NullableWalker.cs (7)
6682
if (node is BoundForEachStatement { EnumeratorInfoOpt: { GetEnumeratorInfo: {
Method
: { TypeArgumentsWithAnnotations: { IsEmpty: false } } } } })
10897
if (enumeratorInfoOpt?.GetEnumeratorInfo is {
Method
: { IsExtensionMethod: true, Parameters: var parameters } } enumeratorMethodInfo)
10912
enumeratorMethodInfo.
Method
);
10964
bool reportedDiagnostic = enumeratorInfoOpt?.GetEnumeratorInfo.
Method
is { IsExtensionMethod: true }
11008
reinferredGetEnumeratorMethod = (MethodSymbol)AsMemberOfType(getEnumeratorType, enumeratorInfoOpt.GetEnumeratorInfo.
Method
);
11030
var moveNextAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, enumeratorInfoOpt.MoveNextInfo.
Method
);
11043
if (enumeratorInfoOpt.PatternDisposeInfo is {
Method
: var originalDisposeMethod }) // no statically known Dispose method if doing a runtime check
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
234
if (enumeratorInfo.GetEnumeratorInfo.
Method
.IsExtensionMethod)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
178
if (!ShouldUseIEnumerableBulkAddMethod(singleSpread.Expression.Type, toListOfElementType.Parameters[0].Type, singleSpread.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
681
&& ShouldUseIEnumerableBulkAddMethod(spreadExpression.Type!, linqToArrayMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
1183
if (!ShouldUseIEnumerableBulkAddMethod(rewrittenSpreadOperand.Type, addRangeMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (7)
154
TypeSymbol enumeratorType = getEnumeratorInfo.
Method
.ReturnType;
162
var receiver = ConvertReceiverForInvocation(forEachSyntax, rewrittenExpression, getEnumeratorInfo.
Method
, convertedCollection.Conversion, enumeratorInfo.CollectionType);
167
if (getEnumeratorInfo.
Method
.IsExtensionMethod)
174
getEnumeratorInfo.
Method
,
184
allowExtensionAndOptionalParameters: isAsync || getEnumeratorInfo.
Method
.IsExtensionMethod, firstRewrittenArgument: firstRewrittenArgument);
324
MethodSymbol? disposeMethod = enumeratorInfo.PatternDisposeInfo?.
Method
; // pattern-based
548
return BoundCall.Synthesized(syntax, receiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, methodArgumentInfo.
Method
, arguments: ImmutableArray<BoundExpression>.Empty);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
445
MethodSymbol? disposeMethod = disposeInfo?.
Method
;
494
MethodSymbol method = methodArgumentInfo.
Method
;
Operations\CSharpOperationFactory.cs (11)
1902
enumeratorInfoOpt.GetEnumeratorInfo.
Method
.GetPublicSymbol(),
1904
enumeratorInfoOpt.MoveNextInfo.
Method
.GetPublicSymbol(),
1911
HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorInfoOpt.GetEnumeratorInfo.
Method
.ReturnType,
1916
enumeratorInfoOpt.PatternDisposeInfo?.
Method
.GetPublicSymbol(),
1943
info.
Method
,
1947
invokedAsExtensionMethod: info.
Method
.IsExtensionMethod
2039
disposeMethod: boundUsingStatement.PatternDisposeInfoOpt.
Method
.GetPublicSymbol(),
2178
disposeMethod: usingDecl.PatternDisposeInfoOpt.
Method
.GetPublicSymbol(),
2943
Debug.Assert(!patternDisposeInfo.
Method
.IsStatic);
2945
if (patternDisposeInfo.
Method
.ParameterCount == 0)
2951
patternDisposeInfo.
Method
,