Skip to content

,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

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
source[IQbservable](#The sequence to take elements from.
countintThe number of elements to skip before returning the remaining elements.

Returns: IQbservable -- An observable sequence that contains the elements that occur after the specified index in the input sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentOutOfRangeExceptioncount 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

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
source[IQbservable](#Source sequence to skip elements for.
durationTimeSpanDuration for skipping elements from the start of the sequence.

Returns: IQbservable -- An observable sequence with the elements skipped during the specified duration from the start of the source sequence.

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

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentOutOfRangeExceptionduration 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

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
source[IQbservable](#Source sequence to skip elements for.
durationTimeSpanDuration for skipping elements from the start of the sequence.
scheduler[IScheduler](#Scheduler to run the timer on.

Returns: IQbservable -- An observable sequence with the elements skipped during the specified duration from the start of the source sequence.

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

TypeCondition
System.ArgumentNullExceptionsource or scheduler is null.
System.ArgumentOutOfRangeExceptionduration is less than TimeSpan.Zero.