1 write to GetEnumeratorInfo
Microsoft.CodeAnalysis.CSharp (1)
Binder\ForEachEnumeratorInfo.cs (1)
82this.GetEnumeratorInfo = getEnumeratorInfo;
51 references to GetEnumeratorInfo
Microsoft.CodeAnalysis.CSharp (14)
Binder\RefSafetyAnalysis.cs (1)
1120resultType: node.EnumeratorInfoOpt.GetEnumeratorInfo.Method.ContainingType,
Compilation\MemberSemanticModel.cs (1)
989enumeratorInfoOpt.GetEnumeratorInfo.Method.GetPublicSymbol(),
FlowAnalysis\NullableWalker.cs (3)
11606if (enumeratorInfoOpt?.GetEnumeratorInfo is { } enumeratorMethodInfo 11678bool reportedDiagnostic = enumeratorInfoOpt?.GetEnumeratorInfo.Method is { } getEnumeratorMethod 11723reinferredGetEnumeratorMethod = (MethodSymbol)AsMemberOfType(getEnumeratorType, enumeratorInfoOpt.GetEnumeratorInfo.Method);
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
232if (enumeratorInfo.GetEnumeratorInfo.Method.IsExtensionMethod) // Tracked by https://github.com/dotnet/roslyn/issues/78828: Test this code path with new extensions 234foreach (var arg in enumeratorInfo.GetEnumeratorInfo.Arguments)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
177if (!ShouldUseIEnumerableBulkAddMethod(singleSpread.Expression.Type, toListOfElementType.Parameters[0].Type, singleSpread.EnumeratorInfoOpt?.GetEnumeratorInfo.Method)) 680&& ShouldUseIEnumerableBulkAddMethod(spreadExpression.Type!, linqToArrayMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.Method)) 1182if (!ShouldUseIEnumerableBulkAddMethod(rewrittenSpreadOperand.Type, addRangeMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.Method))
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
154MethodArgumentInfo getEnumeratorInfo = enumeratorInfo.GetEnumeratorInfo;
Operations\CSharpOperationFactory.cs (3)
1902enumeratorInfoOpt.GetEnumeratorInfo.Method.GetPublicSymbol(), 1911HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorInfoOpt.GetEnumeratorInfo.Method.ReturnType, 1919getEnumeratorArguments: createArgumentOperations(enumeratorInfoOpt.GetEnumeratorInfo),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\ForEachTests.cs (37)
1209Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1210Assert.Empty(info.GetEnumeratorInfo.Arguments); 1247Assert.Equal("System.CharEnumerator System.String.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1248Assert.Empty(info.GetEnumeratorInfo.Arguments); 1291Assert.Equal("Enumerator Enumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1292Assert.Empty(info.GetEnumeratorInfo.Arguments); 1335Assert.Equal("Enumerator Enumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1336Assert.Empty(info.GetEnumeratorInfo.Arguments); 1368Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1369Assert.Empty(info.GetEnumeratorInfo.Arguments); 1408Assert.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1409Assert.Empty(info.GetEnumeratorInfo.Arguments); 1450Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1451Assert.Empty(info.GetEnumeratorInfo.Arguments); 1489Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1490Assert.Empty(info.GetEnumeratorInfo.Arguments); 1522Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1523Assert.Empty(info.GetEnumeratorInfo.Arguments); 1553Assert.Equal("System.CharEnumerator System.String.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1554Assert.Empty(info.GetEnumeratorInfo.Arguments); 1639Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1640Assert.Empty(info.GetEnumeratorInfo.Arguments); 1670Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1671Assert.Empty(info.GetEnumeratorInfo.Arguments); 1703Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1704Assert.Empty(info.GetEnumeratorInfo.Arguments); 1744Assert.Equal("T Enumerable<T>.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1745Assert.Empty(info.GetEnumeratorInfo.Arguments); 1828Assert.Equal("T Enumerable<T>.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1829Assert.Empty(info.GetEnumeratorInfo.Arguments); 1875Assert.Equal("Enumerator Enumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1876Assert.Empty(info.GetEnumeratorInfo.Arguments); 3119Assert.Equal("System.CharEnumerator System.String.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 3120Assert.Empty(info.GetEnumeratorInfo.Arguments); 3237Assert.Equal("C.Enumerator Extensions.GetEnumerator(this C self)", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 3238Assert.Equal("C", info.GetEnumeratorInfo.Arguments.Single().Type.ToTestDisplayString()); 3276Assert.Equal(enumeratorInfo.GetEnumeratorInfo.Method.GetPublicSymbol(), statementInfo.GetEnumeratorMethod);