Interface IEnumerableTypeShape
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
Provides a strongly typed shape model for a .NET type that is enumerable.
public interface IEnumerableTypeShape : ITypeShape
- Inherited Members
Remarks
Typically covers all types implementing IEnumerable<T> or IEnumerable.
Properties
ComparerOptions
Gets the kind of custom comparer (if any) that this collection may be initialized with.
CollectionComparerOptions ComparerOptions { get; }
Property Value
ConstructionStrategy
Gets the construction strategy for the given collection.
CollectionConstructionStrategy ConstructionStrategy { get; }
Property Value
ElementType
Gets the shape of the underlying element type.
ITypeShape ElementType { get; }
Property Value
Remarks
For non-generic IEnumerable this returns the shape for object.
IsAsyncEnumerable
Indicates whether the underlying type is an IAsyncEnumerable.
bool IsAsyncEnumerable { get; }
Property Value
Remarks
Calling GetGetEnumerable() on async enumerable instances will result in an exception being thrown to prevent accidental sync-over-async. Users should manually cast instances to IAsyncEnumerable and enumerate elements asynchronously.
Rank
Gets the dimensionality of the collection type.
int Rank { get; }
Property Value
- int
IEnumerable<T>, most collections and most arrays have a rank of 1.