,System.DateTimeOffset)} ,System.DateTimeOffset,System.Reactive.Concurrency.IScheduler)} ,System.TimeSpan)} ,System.TimeSpan,System.Reactive.Concurrency.IScheduler)}
Qbservable.DelaySubscription(IQbservable, DateTimeOffset) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, DateTimeOffset dueTime) - 2.
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, DateTimeOffset dueTime, IScheduler scheduler) - 3.
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, TimeSpan dueTime) - 4.
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, TimeSpan dueTime, IScheduler scheduler)
1. Overload¶
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, DateTimeOffset dueTime)
Summary: Time shifts the observable sequence by delaying the subscription to the specified absolute time.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source sequence to delay subscription for. |
dueTime | DateTimeOffset | Absolute time to perform the subscription at. |
Returns: IQbservable
Remarks
This operator is more efficient than Delay but postpones all side-effects of subscription and affects error propagation timing.
The side-effects of subscribing to the source sequence will be run on the default scheduler. Observer callbacks will not be affected.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
2. Overload¶
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, DateTimeOffset dueTime, IScheduler scheduler)
Summary: Time shifts the observable sequence by delaying the subscription to the specified absolute time, using the specified scheduler to run timers.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source sequence to delay subscription for. |
dueTime | DateTimeOffset | Absolute time to perform the subscription at. |
scheduler | [IScheduler](# | Scheduler to run the subscription delay timer on. |
Returns: IQbservable
Remarks
This operator is more efficient than Delay but postpones all side-effects of subscription and affects error propagation timing.
The side-effects of subscribing to the source sequence will be run on the specified scheduler. Observer callbacks will not be affected.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or scheduler is null. |
3. Overload¶
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, TimeSpan dueTime)
Summary: Time shifts the observable sequence by delaying the subscription with the specified relative time duration.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source sequence to delay subscription for. |
dueTime | TimeSpan | Relative time shift of the subscription. |
Returns: IQbservable
Remarks
This operator is more efficient than Delay but postpones all side-effects of subscription and affects error propagation timing.
The side-effects of subscribing to the source sequence will be run on the default scheduler. Observer callbacks will not be affected.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
| System.ArgumentOutOfRangeException | dueTime is less than TimeSpan.Zero. |
4. Overload¶
public static IQbservable<TSource> DelaySubscription<TSource>(this IQbservable<TSource> source, TimeSpan dueTime, IScheduler scheduler)
Summary: Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source sequence to delay subscription for. |
dueTime | TimeSpan | Relative time shift of the subscription. |
scheduler | [IScheduler](# | Scheduler to run the subscription delay timer on. |
Returns: IQbservable
Remarks
This operator is more efficient than Delay but postpones all side-effects of subscription and affects error propagation timing.
The side-effects of subscribing to the source sequence will be run on the specified scheduler. Observer callbacks will not be affected.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or scheduler is null. |
| System.ArgumentOutOfRangeException | dueTime is less than TimeSpan.Zero. |