ParallelEnumerable.WithMergeOptions<TSource>(ParallelQuery<TSource>, ParallelMergeOptions) 方法

定义

设置此查询的合并选项,它指定查询对输出进行缓冲处理的方式。Sets the merge options for this query, which specify how the query will buffer output.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ WithMergeOptions(System::Linq::ParallelQuery<TSource> ^ source, System::Linq::ParallelMergeOptions mergeOptions);
public static System.Linq.ParallelQuery<TSource> WithMergeOptions<TSource> (this System.Linq.ParallelQuery<TSource> source, System.Linq.ParallelMergeOptions mergeOptions);
static member WithMergeOptions : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelMergeOptions -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function WithMergeOptions(Of TSource) (source As ParallelQuery(Of TSource), mergeOptions As ParallelMergeOptions) As ParallelQuery(Of TSource)

类型参数

TSource

source 的元素类型。The type of elements of source.

参数

source
ParallelQuery<TSource>

要对其设置选项的 ParallelQuery。A ParallelQuery on which to set the option.

mergeOptions
ParallelMergeOptions

要为此查询设置的合并选项。The merge options to set for this query.

返回

表示与源相同的查询的 ParallelQuery,但带有已注册的合并选项。ParallelQuery representing the same query as source, but with the registered merge options.

异常

source 为 null 引用(在 Visual Basic 中为 Nothing)。source is a null reference (Nothing in Visual Basic).

mergeOptions 不是有效的 ParallelMergeOptions 值。mergeOptions is not a valid ParallelMergeOptions value.

在该查询中,多次使用 WithMergeOptionsWithMergeOptions is used multiple times in the query.

适用于

另请参阅