ParallelEnumerable.WithCancellation<TSource> Method (ParallelQuery<TSource>, CancellationToken)
Sets the CancellationToken to associate with the query.
Assembly: System.Core (in System.Core.dll)
public static ParallelQuery<TSource> WithCancellation<TSource>( this ParallelQuery<TSource> source, CancellationToken cancellationToken )
A ParallelQuery on which to set the option.
A cancellation token.
Return ValueType: System.Linq.ParallelQuery< >
ParallelQuery representing the same query as source, but with the registered cancellation token.
The type of elements of source.
Available since 8
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 8.1