Partitioner<TSource>.GetDynamicPartitions 方法

定义

创建一个可将基础集合分区成可变数目的分区的对象。Creates an object that can partition the underlying collection into a variable number of partitions.

public:
 virtual System::Collections::Generic::IEnumerable<TSource> ^ GetDynamicPartitions();
public virtual System.Collections.Generic.IEnumerable<TSource> GetDynamicPartitions ();
abstract member GetDynamicPartitions : unit -> seq<'Source>
override this.GetDynamicPartitions : unit -> seq<'Source>
Public Overridable Function GetDynamicPartitions () As IEnumerable(Of TSource)

返回

IEnumerable<TSource>

一个可针对基础数据源创建分区的对象。An object that can create partitions over the underlying data source.

例外

该基类不支持动态分区。Dynamic partitioning is not supported by the base class. 必须在派生类中实现它。You must implement it in a derived class.

注解

返回的对象实现 System.Collections.Generic.IEnumerable<T> 接口。The returned object implements the System.Collections.Generic.IEnumerable<T> interface. 对对象调用会在 GetEnumerator 序列上创建另一个分区。Calling GetEnumerator on the object creates another partition over the sequence.

GetDynamicPartitions仅当属性返回 true 时,才支持方法 SupportsDynamicPartitionsThe GetDynamicPartitions method is only supported if the SupportsDynamicPartitions property returns true. 有关详细信息,请参阅 PLINQ 和 TPL 的自定义分区程序For more information, see Custom Partitioners for PLINQ and TPL.

适用于

另请参阅