AsParallel(TSource) Method (Partitioner(TSource))
Collapse the table of content
Expand the table of content

ParallelEnumerable.AsParallel(Of TSource) Method (Partitioner(Of TSource))

.NET Framework (current version)
 

Enables parallelization of a query, as sourced by a custom partitioner that is responsible for splitting the input sequence into partitions.

Namespace:   System.Linq
Assembly:  System.Core (in System.Core.dll)

<ExtensionAttribute>
Public Shared Function AsParallel(Of TSource) (
	source As Partitioner(Of TSource)
) As ParallelQuery(Of TSource)

Parameters

source
Type: System.Collections.Concurrent.Partitioner(Of TSource)

A partitioner over the input sequence.

Return Value

Type: System.Linq.ParallelQuery(Of TSource)

The source as a ParallelQuery to bind to ParallelEnumerable extension methods.

Type Parameters

TSource

The type of elements of source.

Exception Condition
ArgumentNullException

source is a null reference (Nothing in Visual Basic).

The source partitioner's GetOrderedPartitions method is used when ordering is enabled, whereas the partitioner's GetPartitions is used if ordering is not enabled (the default). The source partitioner's GetDynamicPartitions and GetDynamicOrderedPartitions are not used. For more information and examples, see Custom Partitioners for PLINQ and TPL.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft