1 write to CollectionType
Microsoft.CodeAnalysis.CSharp (1)
Binder\ForEachEnumeratorInfo.cs (1)
85this.CollectionType = collectionType;
20 references to CollectionType
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
5331var collectionType = enumeratorInfo.CollectionType;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
166var receiver = ConvertReceiverForInvocation(forEachSyntax, rewrittenExpression, getEnumeratorInfo.Method, convertedCollection.Conversion, enumeratorInfo.CollectionType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\ForEachTests.cs (18)
1723Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1761Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1805Assert.Equal("Enumerable", info.CollectionType.ToTestDisplayString()); 1849Assert.Equal("Enumerable", info.CollectionType.ToTestDisplayString()); 1882Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); 1922Assert.Equal("System.Collections.Generic.IEnumerable<System.Int32>", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1964Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: fall back on non-generic, since generic is inaccessible 2003Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 2036Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 2067Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 2153Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 2184Assert.Equal(SpecialType.System_Collections_IEnumerable, info.CollectionType.SpecialType); 2217Assert.Equal(SpecialType.System_Collections_IEnumerable, info.CollectionType.SpecialType); 2258Assert.Equal("Enumerable<T>", info.CollectionType.ToTestDisplayString()); 2342Assert.Equal("Enumerable<T>", info.CollectionType.ToTestDisplayString()); 2389Assert.Equal("Enumerable", info.CollectionType.ToTestDisplayString()); 3633Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 3751Assert.Equal("C", info.CollectionType.ToTestDisplayString());