Table of Contents

Class PartitionerCollection<T>

Namespace
Cuemon.Collections.Generic
Assembly
Cuemon.Core.dll

Represents a generic and read-only collection that is iterated in partitions. Implements the PartitionerEnumerable<T> Implements the System.Collections.Generic.IReadOnlyCollection<T>

public class PartitionerCollection<T> : PartitionerEnumerable<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements in the collection.

Inheritance
Object
PartitionerCollection<T>
Implements
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable
Inherited Members

Constructors

PartitionerCollection(ICollection<T>, Int32)

Initializes a new instance of the PartitionerCollection<T> class.

public PartitionerCollection(ICollection<T> source, int partitionSize = 128)

Parameters

source ICollection<T>

The sequence to iterate in partitions.

partitionSize Int32

The size of the partitions.

Properties

Count

Gets the total number of elements in the sequence before partitioning is applied.

public int Count { get; }

Property Value

Int32

The total number of elements in the sequence before partitioning is applied.

PartitionsCount

Gets the total amount of partitions for the elements in this sequence.

public int PartitionsCount { get; }

Property Value

Int32

The total amount of partitions for the elements in this sequence.

Remaining

Gets the number of elements remaining in the partitioned sequence.

public int Remaining { get; }

Property Value

Int32

The number of elements remaining in the partitioned sequence.

See Also

PartitionerEnumerable<T>
IReadOnlyCollection<T>