,System.TimeSpan)} ,System.TimeSpan,System.TimeProvider)}
ObservableAsync.Delay(IObservableAsync, TimeSpan) method¶
Defined in
Type: ObservableAsync
Namespace: ReactiveUI.Extensions.Async
Assembly: ReactiveUI.Extensions.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Overloads¶
- 1.
public static IObservableAsync<T> Delay<T>(this IObservableAsync<T> @this, TimeSpan delayInterval) - 2.
public static IObservableAsync<T> Delay<T>(this IObservableAsync<T> @this, TimeSpan delayInterval, TimeProvider? timeProvider)
1. Overload¶
public static IObservableAsync<T> Delay<T>(this IObservableAsync<T> @this, TimeSpan delayInterval)
Summary: Time-shifts the observable sequence by the specified time span. Each element notification is delayed by the specified duration.
Type parameters
| Name | Description |
|---|---|
T | The type of elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
this | [IObservableAsync | The source observable sequence. |
delayInterval | TimeSpan | The time span by which to delay each element notification. Must be non-negative. |
Returns: IObservableAsync
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | Thrown if delayInterval is negative. |
2. Overload¶
public static IObservableAsync<T> Delay<T>(this IObservableAsync<T> @this, TimeSpan delayInterval, TimeProvider? timeProvider)
Summary: Time-shifts the observable sequence by the specified time span. Each element notification is delayed by the specified duration.
Type parameters
| Name | Description |
|---|---|
T | The type of elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
this | [IObservableAsync | The source observable sequence. |
delayInterval | TimeSpan | The time span by which to delay each element notification. Must be non-negative. |
timeProvider | TimeProvider? | An optional time provider for controlling timing. If null, System is used. |
Returns: IObservableAsync
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | Thrown if delayInterval is negative. |