1 write to Method
Microsoft.CodeAnalysis.CSharp (1)
Binder\MethodArgumentInfo.cs (1)
28
this.
Method
= method;
65 references to Method
Microsoft.CodeAnalysis.CSharp (65)
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 (27)
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;
885
Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.
Method
.IsExtensionMethod || builder.GetEnumeratorInfo.
Method
.IsExtensionBlockMember());
932
Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.
Method
.IsExtensionMethod || builder.GetEnumeratorInfo.
Method
.IsExtensionBlockMember());
1034
Debug.Assert(!(viaExtensionMethod && builder.GetEnumeratorInfo.
Method
.IsExtensionMethod && builder.GetEnumeratorInfo.
Method
.Parameters.IsDefaultOrEmpty));
1035
Debug.Assert(!(viaExtensionMethod && !builder.GetEnumeratorInfo.
Method
.IsExtensionMethod && !builder.GetEnumeratorInfo.
Method
.IsExtensionBlockMember()));
1041
if (builder.GetEnumeratorInfo.
Method
.IsExtensionMethod)
1043
builder.CollectionType = builder.GetEnumeratorInfo.
Method
.Parameters[0].Type;
1047
builder.CollectionType = builder.GetEnumeratorInfo.
Method
.ContainingType.ExtensionParameter.Type;
1064
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.
Method
;
1189
builder.GetEnumeratorInfo.
Method
.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator);
1204
TypeSymbol enumeratorType = builder.GetEnumeratorInfo.
Method
.ReturnType;
1325
TypeSymbol.Equals(builder.GetEnumeratorInfo.
Method
.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2));
1643
Debug.Assert((object)builder.GetEnumeratorInfo.
Method
!= null);
1645
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.
Method
;
1731
moveNextMethodCandidate.
Method
.IsStatic || moveNextMethodCandidate.
Method
.DeclaredAccessibility != Accessibility.Public ||
1732
IsInvalidMoveNextMethod(moveNextMethodCandidate.
Method
, isAsync))
Binder\RefSafetyAnalysis.cs (1)
1271
resultType: node.EnumeratorInfoOpt.GetEnumeratorInfo.
Method
.ContainingType,
Compilation\MemberSemanticModel.cs (3)
1011
if (enumeratorInfoOpt.PatternDisposeInfo is {
Method
: var method })
1025
enumeratorInfoOpt.GetEnumeratorInfo.
Method
.GetPublicSymbol(),
1026
enumeratorInfoOpt.MoveNextInfo.
Method
.GetPublicSymbol(),
FlowAnalysis\NullableWalker.cs (9)
3638
VisitAwaitableInfoForUsing(node.AwaitOpt, node.PatternDisposeInfoOpt?.
Method
);
3644
VisitAwaitableInfoForUsing(node.AwaitOpt, node.PatternDisposeInfoOpt?.
Method
);
12404
&& (enumeratorMethodInfo.
Method
.IsExtensionMethod || enumeratorMethodInfo.
Method
.IsExtensionBlockMember()))
12414
method: enumeratorMethodInfo.
Method
,
12475
bool reportedDiagnostic = enumeratorInfoOpt?.GetEnumeratorInfo.
Method
is { } getEnumeratorMethod
12520
reinferredGetEnumeratorMethod = (MethodSymbol)AsMemberOfType(getEnumeratorType, enumeratorInfoOpt.GetEnumeratorInfo.
Method
);
12542
var moveNextAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, enumeratorInfoOpt.MoveNextInfo.
Method
);
12553
var patternDisposeMethod = enumeratorInfoOpt.PatternDisposeInfo?.
Method
;
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
246
if (enumeratorInfo.GetEnumeratorInfo.
Method
.IsExtensionMethod) // Tracked by https://github.com/dotnet/roslyn/issues/78828: Test this code path with new extensions
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
187
if (!ShouldUseIEnumerableBulkAddMethod(singleSpread.Expression.Type, toListOfElementType.Parameters[0].Type, singleSpread.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
787
&& ShouldUseIEnumerableBulkAddMethod(spreadExpression.Type!, linqToArrayMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.
Method
))
1350
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)
1968
enumeratorInfoOpt.GetEnumeratorInfo.
Method
.GetPublicSymbol(),
1970
enumeratorInfoOpt.MoveNextInfo.
Method
.GetPublicSymbol(),
1977
HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorInfoOpt.GetEnumeratorInfo.
Method
.ReturnType,
1982
enumeratorInfoOpt.PatternDisposeInfo?.
Method
.GetPublicSymbol(),
2009
info.
Method
,
2013
invokedAsExtensionMethod: info.
Method
.IsExtensionMethod
2105
disposeMethod: boundUsingStatement.PatternDisposeInfoOpt.
Method
.GetPublicSymbol(),
2244
disposeMethod: usingDecl.PatternDisposeInfoOpt.
Method
.GetPublicSymbol(),
3009
Debug.Assert(!patternDisposeInfo.
Method
.IsStatic);
3011
if (patternDisposeInfo.
Method
.ParameterCount == 0)
3017
patternDisposeInfo.
Method
,