1 write to GetEnumeratorInfo
Microsoft.CodeAnalysis.CSharp (1)
Binder\ForEachEnumeratorInfo.cs (1)
89this.GetEnumeratorInfo = getEnumeratorInfo;
51 references to GetEnumeratorInfo
Microsoft.CodeAnalysis.CSharp (14)
Binder\RefSafetyAnalysis.cs (1)
1268resultType: node.EnumeratorInfoOpt.GetEnumeratorInfo.Method.ContainingType,
Compilation\MemberSemanticModel.cs (1)
1025enumeratorInfoOpt.GetEnumeratorInfo.Method.GetPublicSymbol(),
FlowAnalysis\NullableWalker.cs (3)
11739if (enumeratorInfoOpt?.GetEnumeratorInfo is { } enumeratorMethodInfo 11810bool reportedDiagnostic = enumeratorInfoOpt?.GetEnumeratorInfo.Method is { } getEnumeratorMethod 11855reinferredGetEnumeratorMethod = (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)
162if (!ShouldUseIEnumerableBulkAddMethod(singleSpread.Expression.Type, toListOfElementType.Parameters[0].Type, singleSpread.EnumeratorInfoOpt?.GetEnumeratorInfo.Method)) 750&& ShouldUseIEnumerableBulkAddMethod(spreadExpression.Type!, linqToArrayMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.Method)) 1253if (!ShouldUseIEnumerableBulkAddMethod(rewrittenSpreadOperand.Type, addRangeMethod.Parameters[0].Type, spreadElement.EnumeratorInfoOpt?.GetEnumeratorInfo.Method))
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
157MethodArgumentInfo getEnumeratorInfo = enumeratorInfo.GetEnumeratorInfo;
Operations\CSharpOperationFactory.cs (3)
1893enumeratorInfoOpt.GetEnumeratorInfo.Method.GetPublicSymbol(), 1902HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorInfoOpt.GetEnumeratorInfo.Method.ReturnType, 1910getEnumeratorArguments: createArgumentOperations(enumeratorInfoOpt.GetEnumeratorInfo),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\ForEachTests.cs (37)
1725Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1726Assert.Empty(info.GetEnumeratorInfo.Arguments); 1763Assert.Equal("System.CharEnumerator System.String.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1764Assert.Empty(info.GetEnumeratorInfo.Arguments); 1807Assert.Equal("Enumerator Enumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1808Assert.Empty(info.GetEnumeratorInfo.Arguments); 1851Assert.Equal("Enumerator Enumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1852Assert.Empty(info.GetEnumeratorInfo.Arguments); 1884Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1885Assert.Empty(info.GetEnumeratorInfo.Arguments); 1924Assert.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1925Assert.Empty(info.GetEnumeratorInfo.Arguments); 1966Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 1967Assert.Empty(info.GetEnumeratorInfo.Arguments); 2005Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2006Assert.Empty(info.GetEnumeratorInfo.Arguments); 2038Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2039Assert.Empty(info.GetEnumeratorInfo.Arguments); 2069Assert.Equal("System.CharEnumerator System.String.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2070Assert.Empty(info.GetEnumeratorInfo.Arguments); 2155Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2156Assert.Empty(info.GetEnumeratorInfo.Arguments); 2186Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2187Assert.Empty(info.GetEnumeratorInfo.Arguments); 2219Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2220Assert.Empty(info.GetEnumeratorInfo.Arguments); 2260Assert.Equal("T Enumerable<T>.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2261Assert.Empty(info.GetEnumeratorInfo.Arguments); 2344Assert.Equal("T Enumerable<T>.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2345Assert.Empty(info.GetEnumeratorInfo.Arguments); 2391Assert.Equal("Enumerator Enumerable.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 2392Assert.Empty(info.GetEnumeratorInfo.Arguments); 3635Assert.Equal("System.CharEnumerator System.String.GetEnumerator()", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 3636Assert.Empty(info.GetEnumeratorInfo.Arguments); 3753Assert.Equal("C.Enumerator Extensions.GetEnumerator(this C self)", info.GetEnumeratorInfo.Method.ToTestDisplayString()); 3754Assert.Equal("C", info.GetEnumeratorInfo.Arguments.Single().Type.ToTestDisplayString()); 3792Assert.Equal(enumeratorInfo.GetEnumeratorInfo.Method.GetPublicSymbol(), statementInfo.GetEnumeratorMethod);