Class CachedCountEnumerable
- Namespace
- Garyon.Extensions
- Assembly
- Garyon.dll
An IEnumerable wrapper that provides the ability to cache the count of the underlying enumerable, and also provide the real-time lower bound of the count while enumerating.
public class CachedCountEnumerable : IEnumerable
- Inheritance
-
CachedCountEnumerable
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
CachedCountEnumerable(IEnumerable)
public CachedCountEnumerable(IEnumerable enumerable)
Parameters
enumerableIEnumerable
Properties
CachedCount
The cached count of the enumerable.
public int? CachedCount { get; }
Property Value
- int?
MinCount
The lower bound of the count of the enumerable.
public int MinCount { get; }
Property Value
Methods
ForceCount()
Gets the count of the enumerable, forcing its complete enumeration if the count is not yet known.
public int ForceCount()