TaskAsyncEnumerableExtensions.WithCancellation<T>(IAsyncEnumerable<T>, CancellationToken) Yöntem
Tanım
CancellationTokenYineleme sırasında geçirilecek öğesine ayarlanır GetAsyncEnumerator(CancellationToken) .Sets the CancellationToken to be passed to GetAsyncEnumerator(CancellationToken) when iterating.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Runtime::CompilerServices::ConfiguredCancelableAsyncEnumerable<T> WithCancellation(System::Collections::Generic::IAsyncEnumerable<T> ^ source, System::Threading::CancellationToken cancellationToken);
public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> WithCancellation<T> (this System.Collections.Generic.IAsyncEnumerable<T> source, System.Threading.CancellationToken cancellationToken);
static member WithCancellation : System.Collections.Generic.IAsyncEnumerable<'T> * System.Threading.CancellationToken -> System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<'T>
<Extension()>
Public Function WithCancellation(Of T) (source As IAsyncEnumerable(Of T), cancellationToken As CancellationToken) As ConfiguredCancelableAsyncEnumerable(Of T)
Tür Parametreleri
- T
Yineedilecek nesnelerin türü.The type of the objects to iterate.
Parametreler
- source
- IAsyncEnumerable<T>
Kaynak, yineleme için sıralanabilir.The source enumerable to iterate.
- cancellationToken
- CancellationToken
Kullanılacak iptal belirteci.The cancellation token to use.
Döndürülenler
Yapılandırılan Numaralandırılabilir.The configured enumerable.