,System.Int32)} ,System.TimeSpan)} ,System.TimeSpan,System.Reactive.Concurrency.IScheduler)}
Qbservable.Skip(IQbservable, int) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IQbservable<TSource> Skip<TSource>(this IQbservable<TSource> source, int count) - 2.
public static IQbservable<TSource> Skip<TSource>(this IQbservable<TSource> source, TimeSpan duration) - 3.
public static IQbservable<TSource> Skip<TSource>(this IQbservable<TSource> source, TimeSpan duration, IScheduler scheduler)
1. Overload¶
public static IQbservable<TSource> Skip<TSource>(this IQbservable<TSource> source, int count)
Summary: Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | The sequence to take elements from. |
count | int | The number of elements to skip before returning the remaining elements. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
| System.ArgumentOutOfRangeException | count is less than zero. |
2. Overload¶
public static IQbservable<TSource> Skip<TSource>(this IQbservable<TSource> source, TimeSpan duration)
Summary: Skips elements for the specified duration from the start of the observable source sequence.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source sequence to skip elements for. |
duration | TimeSpan | Duration for skipping elements from the start of the sequence. |
Returns: IQbservable
Remarks
Specifying a TimeSpan.Zero value for duration doesn't guarantee no elements will be dropped from the start of the source sequence.
This is a side-effect of the asynchrony introduced by the scheduler, where the action that causes callbacks from the source sequence to be forwarded
may not execute immediately, despite the TimeSpan.Zero due time.
Errors produced by the source sequence are always forwarded to the result sequence, even if the error occurs before the duration.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
| System.ArgumentOutOfRangeException | duration is less than TimeSpan.Zero. |
3. Overload¶
public static IQbservable<TSource> Skip<TSource>(this IQbservable<TSource> source, TimeSpan duration, IScheduler scheduler)
Summary: Skips elements for the specified duration from the start of the observable source sequence, 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 skip elements for. |
duration | TimeSpan | Duration for skipping elements from the start of the sequence. |
scheduler | [IScheduler](# | Scheduler to run the timer on. |
Returns: IQbservable
Remarks
Specifying a TimeSpan.Zero value for duration doesn't guarantee no elements will be dropped from the start of the source sequence.
This is a side-effect of the asynchrony introduced by the scheduler, where the action that causes callbacks from the source sequence to be forwarded
may not execute immediately, despite the TimeSpan.Zero due time.
Errors produced by the source sequence are always forwarded to the result sequence, even if the error occurs before the duration.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or scheduler is null. |
| System.ArgumentOutOfRangeException | duration is less than TimeSpan.Zero. |