'Declaration Public Shared Function WithCancellation(Of T)( _ ByVal items As IEnumerable(Of T), _ ByVal token As CancellationToken _ ) As IEnumerable(Of T)
public static IEnumerable<T> WithCancellation<T>( IEnumerable<T> items, CancellationToken token )
Parameters
- items
- The source sequence.
- token
- A token to cancel enumeration.
Type Parameters
- T
- The type of elements in the sequence.
Return Value
A sequence that supports cancellation.