Partitioner.Create<TSource> Method (IEnumerable<TSource>, EnumerablePartitionerOptions)

.NET Framework 4.5

Creates an orderable partitioner from a IEnumerable<T> instance.

Namespace:  System.Collections.Concurrent
Assembly:  mscorlib (in mscorlib.dll)

public static OrderablePartitioner<TSource> Create<TSource>(
	IEnumerable<TSource> source,
	EnumerablePartitionerOptions partitionerOptions
)

Type Parameters

TSource

Type of the elements in source enumerable.

Parameters

source
Type: System.Collections.Generic.IEnumerable<TSource>

The enumerable to be partitioned.

partitionerOptions
Type: System.Collections.Concurrent.EnumerablePartitionerOptions

Options to control the buffering behavior of the partitioner.

Return Value

Type: System.Collections.Concurrent.OrderablePartitioner<TSource>
An orderable partitioner based on the input array.

ExceptionCondition
ArgumentOutOfRangeException

The partitionerOptions argument specifies an invalid value for EnumerablePartitionerOptions.

The ordering used in the created partitioner is determined by the natural order of the elements as retrieved from the source enumerable.

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft