1 write to CollectionType
Microsoft.CodeAnalysis.CSharp (1)
Binder\ForEachEnumeratorInfo.cs (1)
78this.CollectionType = collectionType;
20 references to CollectionType
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
5309var collectionType = enumeratorInfo.CollectionType;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
163var receiver = ConvertReceiverForInvocation(forEachSyntax, rewrittenExpression, getEnumeratorInfo.Method, convertedCollection.Conversion, enumeratorInfo.CollectionType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\ForEachTests.cs (18)
1207Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1245Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1289Assert.Equal("Enumerable", info.CollectionType.ToTestDisplayString()); 1333Assert.Equal("Enumerable", info.CollectionType.ToTestDisplayString()); 1366Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); 1406Assert.Equal("System.Collections.Generic.IEnumerable<System.Int32>", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1448Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: fall back on non-generic, since generic is inaccessible 1487Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1520Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1551Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1637Assert.Equal("System.Collections.IEnumerable", info.CollectionType.ToTestDisplayString()); //NB: differs from expression type 1668Assert.Equal(SpecialType.System_Collections_IEnumerable, info.CollectionType.SpecialType); 1701Assert.Equal(SpecialType.System_Collections_IEnumerable, info.CollectionType.SpecialType); 1742Assert.Equal("Enumerable<T>", info.CollectionType.ToTestDisplayString()); 1826Assert.Equal("Enumerable<T>", info.CollectionType.ToTestDisplayString()); 1873Assert.Equal("Enumerable", info.CollectionType.ToTestDisplayString()); 3117Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 3235Assert.Equal("C", info.CollectionType.ToTestDisplayString());