WithMergeOptions(TSource) Method

Task Parallel System.Threading

Sets the merge options for this query, which specify how the query will buffer output.

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

Syntax

Visual Basic (Declaration)
Public Shared Function WithMergeOptions(Of TSource) ( _
	source As ParallelQuery(Of TSource), _
	mergeOptions As ParallelMergeOptions _
) As ParallelQuery(Of TSource)
C#
public static ParallelQuery<TSource> WithMergeOptions<TSource>(
	ParallelQuery<TSource> source,
	ParallelMergeOptions mergeOptions
)

Parameters

source
Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
A ParallelQuery on which to set the option.
mergeOptions
Type: System.Linq..::.ParallelMergeOptions
The merge optiosn to set for this query.

Type Parameters

TSource
The type of elements of source.

Return Value

ParallelQuery representing the same query as source, but with the registered.

Exceptions

ExceptionCondition
System..::.ArgumentNullException source is a null reference (Nothing in Visual Basic).
System..::.ArgumentException mergeOptions is not a valid ParallelMergeOptions value.
System..::.InvalidOperationException WithMergeOptions is used multiple times in the query.

See Also