語言

Partitioner.Create 方法

定義

建立一個分割器。

多載

名稱 Description
Create(Int32, Int32)

建立一個分割器,將使用者指定的範圍分割成區塊。

Create(Int64, Int64)

建立一個分割器,將使用者指定的範圍分割成區塊。

Create(Int32, Int32, Int32)

建立一個分割器,將使用者指定的範圍分割成區塊。

Create(Int64, Int64, Int64)

建立一個分割器,將使用者指定的範圍分割成區塊。

Create<TSource>(IEnumerable<TSource>)

從實 IEnumerable<T> 例建立可排序的分割器。

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

從實 IEnumerable<T> 例建立可排序的分割器。

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

從實 IList<T> 例建立一個可排序的分割器。

Create<TSource>(TSource[], Boolean)

從實 Array 例建立可排序的分割器。

Create(Int32, Int32)

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

建立一個分割器,將使用者指定的範圍分割成區塊。

public:
 static System::Collections::Concurrent::OrderablePartitioner<Tuple<int, int> ^> ^ Create(int fromInclusive, int toExclusive);
public static System.Collections.Concurrent.OrderablePartitioner<Tuple<int,int>> Create(int fromInclusive, int toExclusive);
static member Create : int * int -> System.Collections.Concurrent.OrderablePartitioner<int * int>
Public Shared Function Create (fromInclusive As Integer, toExclusive As Integer) As OrderablePartitioner(Of Tuple(Of Integer, Integer))

參數

fromInclusive
Int32

範圍的下限。

toExclusive
Int32

這是該範圍的上層、排他性界限。

傳回

一個分割器。

例外狀況

論toExclusive證大小等於或等於該論證。fromInclusive

備註

欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於

Create(Int64, Int64)

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

建立一個分割器,將使用者指定的範圍分割成區塊。

public:
 static System::Collections::Concurrent::OrderablePartitioner<Tuple<long, long> ^> ^ Create(long fromInclusive, long toExclusive);
public static System.Collections.Concurrent.OrderablePartitioner<Tuple<long,long>> Create(long fromInclusive, long toExclusive);
static member Create : int64 * int64 -> System.Collections.Concurrent.OrderablePartitioner<int64 * int64>
Public Shared Function Create (fromInclusive As Long, toExclusive As Long) As OrderablePartitioner(Of Tuple(Of Long, Long))

參數

fromInclusive
Int64

範圍的下限。

toExclusive
Int64

這是該範圍的上層、排他性界限。

傳回

一個分割器。

例外狀況

論toExclusive證大小等於或等於該論證。fromInclusive

備註

欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於

Create(Int32, Int32, Int32)

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

建立一個分割器,將使用者指定的範圍分割成區塊。

public:
 static System::Collections::Concurrent::OrderablePartitioner<Tuple<int, int> ^> ^ Create(int fromInclusive, int toExclusive, int rangeSize);
public static System.Collections.Concurrent.OrderablePartitioner<Tuple<int,int>> Create(int fromInclusive, int toExclusive, int rangeSize);
static member Create : int * int * int -> System.Collections.Concurrent.OrderablePartitioner<int * int>
Public Shared Function Create (fromInclusive As Integer, toExclusive As Integer, rangeSize As Integer) As OrderablePartitioner(Of Tuple(Of Integer, Integer))

參數

fromInclusive
Int32

範圍的下限。

toExclusive
Int32

這是該範圍的上層、排他性界限。

rangeSize
Int32

每個子範圍的大小。

傳回

一個分割器。

例外狀況

論toExclusive證大小等於或等於該論證。fromInclusive

-或-

該 rangeSize 參數小於或等於0。

備註

欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於

Create(Int64, Int64, Int64)

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

建立一個分割器,將使用者指定的範圍分割成區塊。

public:
 static System::Collections::Concurrent::OrderablePartitioner<Tuple<long, long> ^> ^ Create(long fromInclusive, long toExclusive, long rangeSize);
public static System.Collections.Concurrent.OrderablePartitioner<Tuple<long,long>> Create(long fromInclusive, long toExclusive, long rangeSize);
static member Create : int64 * int64 * int64 -> System.Collections.Concurrent.OrderablePartitioner<int64 * int64>
Public Shared Function Create (fromInclusive As Long, toExclusive As Long, rangeSize As Long) As OrderablePartitioner(Of Tuple(Of Long, Long))

參數

fromInclusive
Int64

範圍的下限。

toExclusive
Int64

這是該範圍的上層、排他性界限。

rangeSize
Int64

每個子範圍的大小。

傳回

一個分割器。

例外狀況

論toExclusive證大小等於或等於該論證。fromInclusive

-或-

該 rangeSize 參數小於或等於0。

備註

欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於

Create<TSource>(IEnumerable<TSource>)

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

從實 IEnumerable<T> 例建立可排序的分割器。

public:
generic <typename TSource>
 static System::Collections::Concurrent::OrderablePartitioner<TSource> ^ Create(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource>(System.Collections.Generic.IEnumerable<TSource> source);
static member Create : seq<'Source> -> System.Collections.Concurrent.OrderablePartitioner<'Source>
Public Shared Function Create(Of TSource) (source As IEnumerable(Of TSource)) As OrderablePartitioner(Of TSource)

類型參數

TSource

來源可列舉元素的類型。

參數

source
IEnumerable<TSource>

可列數需分割。

傳回

基於輸入陣列的可排序分割器。

備註

所建立的分割器所使用的排序,是由從可列源中擷取的元素自然順序決定的。 欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於

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

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

從實 IEnumerable<T> 例建立可排序的分割器。

public:
generic <typename TSource>
 static System::Collections::Concurrent::OrderablePartitioner<TSource> ^ Create(System::Collections::Generic::IEnumerable<TSource> ^ source, System::Collections::Concurrent::EnumerablePartitionerOptions partitionerOptions);
public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource>(System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Concurrent.EnumerablePartitionerOptions partitionerOptions);
static member Create : seq<'Source> * System.Collections.Concurrent.EnumerablePartitionerOptions -> System.Collections.Concurrent.OrderablePartitioner<'Source>
Public Shared Function Create(Of TSource) (source As IEnumerable(Of TSource), partitionerOptions As EnumerablePartitionerOptions) As OrderablePartitioner(Of TSource)

類型參數

TSource

來源可列舉元素的類型。

參數

source
IEnumerable<TSource>

可列數需分割。

partitionerOptions
EnumerablePartitionerOptions

控制分割器的緩衝行為選項。

傳回

基於輸入陣列的可排序分割器。

例外狀況

該partitionerOptions參數指定了一個無效的值。EnumerablePartitionerOptions

備註

所建立的分割器所使用的排序,是由從可列源中擷取的元素自然順序決定的。

適用於

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

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

從實 IList<T> 例建立一個可排序的分割器。

public:
generic <typename TSource>
 static System::Collections::Concurrent::OrderablePartitioner<TSource> ^ Create(System::Collections::Generic::IList<TSource> ^ list, bool loadBalance);
public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource>(System.Collections.Generic.IList<TSource> list, bool loadBalance);
static member Create : System.Collections.Generic.IList<'Source> * bool -> System.Collections.Concurrent.OrderablePartitioner<'Source>
Public Shared Function Create(Of TSource) (list As IList(Of TSource), loadBalance As Boolean) As OrderablePartitioner(Of TSource)

類型參數

TSource

來源列表中元素的類型。

參數

list
IList<TSource>

清單要分割。

loadBalance
Boolean

一個布林值,指示所建立的分割器是否應該在分割間動態負載平衡,而非靜態分割。

傳回

一個基於輸入清單的可排序分割器。

備註

欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於

Create<TSource>(TSource[], Boolean)

來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs
來源:
PartitionerStatic.cs

從實 Array 例建立可排序的分割器。

public:
generic <typename TSource>
 static System::Collections::Concurrent::OrderablePartitioner<TSource> ^ Create(cli::array <TSource> ^ array, bool loadBalance);
public static System.Collections.Concurrent.OrderablePartitioner<TSource> Create<TSource>(TSource[] array, bool loadBalance);
static member Create : 'Source[] * bool -> System.Collections.Concurrent.OrderablePartitioner<'Source>
Public Shared Function Create(Of TSource) (array As TSource(), loadBalance As Boolean) As OrderablePartitioner(Of TSource)

類型參數

TSource

來源陣列中元素的類型。

參數

array
TSource[]

要分割的陣列。

loadBalance
Boolean

一個布林值,指示所建立的分割器是否應該在分割間動態負載平衡,而非靜態分割。

傳回

基於輸入陣列的可排序分割器。

備註

欲了解更多資訊與範例,請參閱 PLINQ 與 TPL 的自訂分割器。

另請參閱

適用於