Partitioner<TSource>.GetPartitions(Int32) Partitioner<TSource>.GetPartitions(Int32) Partitioner<TSource>.GetPartitions(Int32) Partitioner<TSource>.GetPartitions(Int32) Method

定義

將基礎集合分割為指定的分割數目。Partitions the underlying collection into the given number of partitions.

public:
 abstract System::Collections::Generic::IList<System::Collections::Generic::IEnumerator<TSource> ^> ^ GetPartitions(int partitionCount);
public abstract System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<TSource>> GetPartitions (int partitionCount);
abstract member GetPartitions : int -> System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<'Source>>
Public MustOverride Function GetPartitions (partitionCount As Integer) As IList(Of IEnumerator(Of TSource))

參數

partitionCount
Int32 Int32 Int32 Int32

要建立之分割的數目。The number of partitions to create.

傳回

IList<IEnumerator<TSource>>

包含 partitionCount 列舉程式的清單。A list containing partitionCount enumerators.

備註

執行這個方法的類別預期會傳回中partitionCount所指定的資料分割數目。A class that implements this method is expected to return exactly the number of partitions that are specified in partitionCount. 如果分割區不包含任何元素, 則會傳回空的列舉值, 而不是 null (在 Visual Basic 中為任何內容)。If a partition contains no elements, then return an empty enumerator rather than null (Nothing in Visual Basic). 如需詳細資訊,請參閱 PLINQ 和 TPL 的自訂 PartitionerFor more information, see Custom Partitioners for PLINQ and TPL.

適用於

另請參閱