Method Do
View SourceDo<TSource>(IAsyncEnumerable<TSource>, Action<TSource>)
Lazily invokes an action for each value in the sequence.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Action<TSource> onNext)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Action<TSource> | onNext | Action to invoke for each element. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Func<TSource, ValueTask>)
Lazily invokes an action for each value in the sequence.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, ValueTask> onNext)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Func<TSource, ValueTask> | onNext | Action to invoke for each element. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Action<TSource>, Action)
Lazily invokes an action for each value in the sequence, and executes an action for successful termination.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Action<TSource> onNext, Action onCompleted)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Action<TSource> | onNext | Action to invoke for each element. |
Action | onCompleted | Action to invoke on successful termination of the sequence. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Func<TSource, ValueTask>, Func<ValueTask>)
Lazily invokes an action for each value in the sequence, and executes an action for successful termination.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, ValueTask> onNext, Func<ValueTask> onCompleted)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Func<TSource, ValueTask> | onNext | Action to invoke for each element. |
Func<ValueTask> | onCompleted | Action to invoke on successful termination of the sequence. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Action<TSource>, Action<Exception>)
Lazily invokes an action for each value in the sequence, and executes an action upon exceptional termination.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Action<TSource> onNext, Action<Exception> onError)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Action<TSource> | onNext | Action to invoke for each element. |
Action<Exception> | onError | Action to invoke on exceptional termination of the sequence. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Func<TSource, ValueTask>, Func<Exception, ValueTask>)
Lazily invokes an action for each value in the sequence, and executes an action upon exceptional termination.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, ValueTask> onNext, Func<Exception, ValueTask> onError)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Func<TSource, ValueTask> | onNext | Action to invoke for each element. |
Func<Exception, ValueTask> | onError | Action to invoke on exceptional termination of the sequence. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Action<TSource>, Action<Exception>, Action)
Lazily invokes an action for each value in the sequence, and executes an action upon successful or exceptional termination.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Action<TSource> onNext, Action<Exception> onError, Action onCompleted)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Action<TSource> | onNext | Action to invoke for each element. |
Action<Exception> | onError | Action to invoke on exceptional termination of the sequence. |
Action | onCompleted | Action to invoke on successful termination of the sequence. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Do<TSource>(IAsyncEnumerable<TSource>, Func<TSource, ValueTask>, Func<Exception, ValueTask>, Func<ValueTask>)
Lazily invokes an action for each value in the sequence, and executes an action upon successful or exceptional termination.
Declaration
public static IAsyncEnumerable<TSource> Do<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, ValueTask> onNext, Func<Exception, ValueTask> onError, Func<ValueTask> onCompleted)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Func<TSource, ValueTask> | onNext | Action to invoke for each element. |
Func<Exception, ValueTask> | onError | Action to invoke on exceptional termination of the sequence. |
Func<ValueTask> | onCompleted | Action to invoke on successful termination of the sequence. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Sequence exhibiting the specified side-effects upon enumeration. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Remarks
This method uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|