Partitioner.Create 方法

定義

建立 Partitioner。

多載

Create(Int32, Int32)

建立會將使用者指定的範圍分割為區塊的 Partitioner。

Create(Int64, Int64)

建立會將使用者指定的範圍分割為區塊的 Partitioner。

Create(Int32, Int32, Int32)

建立會將使用者指定的範圍分割為區塊的 Partitioner。

Create(Int64, Int64, Int64)

建立會將使用者指定的範圍分割為區塊的 Partitioner。

Create<TSource>(IEnumerable<TSource>)

IEnumerable<T> 執行個體建立可排序的 Partitioner。

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

IEnumerable<T> 執行個體建立可排序的 Partitioner。

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

IList<T> 執行個體建立可排序的 Partitioner。

Create<TSource>(TSource[], Boolean)

Array 執行個體建立可排序的 Partitioner。

Create(Int32, Int32)

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

建立會將使用者指定的範圍分割為區塊的 Partitioner。

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

範圍的上限 (不含)。

傳回

Partitioner。

例外狀況

toExclusive 引數小於或等於 fromInclusive 引數。

備註

如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於

Create(Int64, Int64)

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

建立會將使用者指定的範圍分割為區塊的 Partitioner。

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

範圍的上限 (不含)。

傳回

Partitioner。

例外狀況

toExclusive 引數小於或等於 fromInclusive 引數。

備註

如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於

Create(Int32, Int32, Int32)

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

建立會將使用者指定的範圍分割為區塊的 Partitioner。

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

每一個子範圍的大小。

傳回

Partitioner。

例外狀況

toExclusive 引數小於或等於 fromInclusive 引數。

-或-

rangeSize 引數小於或等於 0。

備註

如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於

Create(Int64, Int64, Int64)

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

建立會將使用者指定的範圍分割為區塊的 Partitioner。

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

每一個子範圍的大小。

傳回

Partitioner。

例外狀況

toExclusive 引數小於或等於 fromInclusive 引數。

-或-

rangeSize 引數小於或等於 0。

備註

如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於

Create<TSource>(IEnumerable<TSource>)

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

IEnumerable<T> 執行個體建立可排序的 Partitioner。

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>

要分割的可列舉值。

傳回

以輸入陣列為基礎的可排序 Partitioner。

備註

在建立的數據分割器中使用的排序是由從來源可列舉擷取之元素的自然順序決定。 如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於

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

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

IEnumerable<T> 執行個體建立可排序的 Partitioner。

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

選項,控制 partitioner 的緩衝行為。

傳回

以輸入陣列為基礎的可排序 Partitioner。

例外狀況

partitionerOptions 引數指定的 EnumerablePartitionerOptions 值不正確。

備註

在建立的數據分割器中使用的排序是由從來源可列舉擷取之元素的自然順序決定。

適用於

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

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

IList<T> 執行個體建立可排序的 Partitioner。

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

布林值,指出建立的 Partitioner 是否應該在分割之間動態負載平衡,而非靜態分割。

傳回

以輸入清單為基礎的可排序 Partitioner。

備註

如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於

Create<TSource>(TSource[], Boolean)

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

Array 執行個體建立可排序的 Partitioner。

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

布林值,指出建立的 Partitioner 是否應該在分割之間動態負載平衡,而非靜態分割。

傳回

以輸入陣列為基礎的可排序 Partitioner。

備註

如需詳細資訊和範例,請參閱 PLINQ 和 TPL 的自定義數據分割器

另請參閱

適用於