[]
Enumerates the items with cancellation support.
public static IEnumerable<T> WithCancellation<T>(this IEnumerable<T> items, CancellationToken token)
Type | Name | Description |
---|---|---|
IEnumerable<T> | items | The source sequence. |
CancellationToken | token | A token to cancel enumeration. |
Type | Description |
---|---|
IEnumerable<T> | A sequence that supports cancellation. |
Name | Description |
---|---|
T | The type of elements in the sequence. |