Partitioner.Create Method

Definition

Creates a partitioner.

Overloads

Create(Int32, Int32)

Creates a partitioner that chunks the user-specified range.

Create(Int64, Int64)

Creates a partitioner that chunks the user-specified range.

Create(Int32, Int32, Int32)

Creates a partitioner that chunks the user-specified range.

Create(Int64, Int64, Int64)

Creates a partitioner that chunks the user-specified range.

Create<TSource>(IEnumerable<TSource>)

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

Create<TSource>(IEnumerable<TSource>, EnumerablePartitionerOptions)

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

Create<TSource>(IList<TSource>, Boolean)

Creates an orderable partitioner from an IList<T> instance.

Create<TSource>(TSource[], Boolean)

Creates an orderable partitioner from a Array instance.

Create(Int32, Int32)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

Creates a partitioner that chunks the user-specified range.

public static System.Collections.Concurrent.OrderablePartitioner<Tuple<int,int>> Create (int fromInclusive, int toExclusive);

Parameters

fromInclusive
Int32

The lower, inclusive bound of the range.

toExclusive
Int32

The upper, exclusive bound of the range.

Returns

A partitioner.

Exceptions

The toExclusive argument is less than or equal to the fromInclusive argument.

Remarks

For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create(Int64, Int64)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

Creates a partitioner that chunks the user-specified range.

public static System.Collections.Concurrent.OrderablePartitioner<Tuple<long,long>> Create (long fromInclusive, long toExclusive);

Parameters

fromInclusive
Int64

The lower, inclusive bound of the range.

toExclusive
Int64

The upper, exclusive bound of the range.

Returns

A partitioner.

Exceptions

The toExclusive argument is less than or equal to the fromInclusive argument.

Remarks

For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create(Int32, Int32, Int32)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

Creates a partitioner that chunks the user-specified range.

public static System.Collections.Concurrent.OrderablePartitioner<Tuple<int,int>> Create (int fromInclusive, int toExclusive, int rangeSize);

Parameters

fromInclusive
Int32

The lower, inclusive bound of the range.

toExclusive
Int32

The upper, exclusive bound of the range.

rangeSize
Int32

The size of each subrange.

Returns

A partitioner.

Exceptions

The toExclusive argument is less than or equal to the fromInclusive argument.

-or-

The rangeSize argument is less than or equal to 0.

Remarks

For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create(Int64, Int64, Int64)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

Creates a partitioner that chunks the user-specified range.

public static System.Collections.Concurrent.OrderablePartitioner<Tuple<long,long>> Create (long fromInclusive, long toExclusive, long rangeSize);

Parameters

fromInclusive
Int64

The lower, inclusive bound of the range.

toExclusive
Int64

The upper, exclusive bound of the range.

rangeSize
Int64

The size of each subrange.

Returns

A partitioner.

Exceptions

The toExclusive argument is less than or equal to the fromInclusive argument.

-or-

The rangeSize argument is less than or equal to 0.

Remarks

For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create<TSource>(IEnumerable<TSource>)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

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

public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource> (System.Collections.Generic.IEnumerable<TSource> source);

Type Parameters

TSource

Type of the elements in source enumerable.

Parameters

source
IEnumerable<TSource>

The enumerable to be partitioned.

Returns

An orderable partitioner based on the input array.

Remarks

The ordering used in the created partitioner is determined by the natural order of the elements as retrieved from the source enumerable. For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create<TSource>(IEnumerable<TSource>, EnumerablePartitionerOptions)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

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

public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource> (System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Concurrent.EnumerablePartitionerOptions partitionerOptions);

Type Parameters

TSource

Type of the elements in source enumerable.

Parameters

source
IEnumerable<TSource>

The enumerable to be partitioned.

partitionerOptions
EnumerablePartitionerOptions

Options to control the buffering behavior of the partitioner.

Returns

An orderable partitioner based on the input array.

Exceptions

The partitionerOptions argument specifies an invalid value for EnumerablePartitionerOptions.

Remarks

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

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create<TSource>(IList<TSource>, Boolean)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

Creates an orderable partitioner from an IList<T> instance.

public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource> (System.Collections.Generic.IList<TSource> list, bool loadBalance);

Type Parameters

TSource

Type of the elements in source list.

Parameters

list
IList<TSource>

The list to be partitioned.

loadBalance
Boolean

A Boolean value that indicates whether the created partitioner should dynamically load balance between partitions rather than statically partition.

Returns

An orderable partitioner based on the input list.

Remarks

For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Create<TSource>(TSource[], Boolean)

Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs
Source:
PartitionerStatic.cs

Creates an orderable partitioner from a Array instance.

public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource> (TSource[] array, bool loadBalance);

Type Parameters

TSource

Type of the elements in source array.

Parameters

array
TSource[]

The array to be partitioned.

loadBalance
Boolean

A Boolean value that indicates whether the created partitioner should dynamically load balance between partitions rather than statically partition.

Returns

An orderable partitioner based on the input array.

Remarks

For more information and examples, see Custom Partitioners for PLINQ and TPL.

See also

Applies to

.NET 9 a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0