Skip to content

)} ,System.TimeSpan)} ,System.TimeSpan,System.Reactive.Concurrency.IScheduler)} ,System.Int32)} ,System.Int32,System.TimeSpan)} ,System.Int32,System.TimeSpan,System.Reactive.Concurrency.IScheduler)}

Qbservable.RefCount(IQbservableProvider, IConnectableObservable) method

Defined in

Type: Qbservable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source)
  • 2. public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, TimeSpan disconnectDelay)
  • 3. public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, TimeSpan disconnectDelay, IScheduler scheduler)
  • 4. public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, int minObservers)
  • 5. public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, int minObservers, TimeSpan disconnectDelay)
  • 6. public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, int minObservers, TimeSpan disconnectDelay, IScheduler scheduler)

1. Overload

public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source)

Summary: Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
source[IConnectableObservable](#Connectable observable sequence.

Returns: IQbservable -- An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

2. Overload

public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, TimeSpan disconnectDelay)

Summary: Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
source[IConnectableObservable](#Connectable observable sequence.
disconnectDelayTimeSpanThe time span that should be waited before possibly unsubscribing from the connectable observable.

Returns: IQbservable -- An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

3. Overload

public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, TimeSpan disconnectDelay, IScheduler scheduler)

Summary: Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
source[IConnectableObservable](#Connectable observable sequence.
disconnectDelayTimeSpanThe time span that should be waited before possibly unsubscribing from the connectable observable.
scheduler[IScheduler](#The scheduler to use for delayed unsubscription.

Returns: IQbservable -- An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

4. Overload

public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, int minObservers)

Summary: Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
source[IConnectableObservable](#Connectable observable sequence.
minObserversintThe minimum number of observers required to subscribe before establishing the connection to the source.

Returns: IQbservable -- An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentOutOfRangeExceptionminObservers is non-positive.

5. Overload

public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, int minObservers, TimeSpan disconnectDelay)

Summary: Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
source[IConnectableObservable](#Connectable observable sequence.
minObserversintThe minimum number of observers required to subscribe before establishing the connection to the source.
disconnectDelayTimeSpanThe time span that should be waited before possibly unsubscribing from the connectable observable.

Returns: IQbservable -- An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentOutOfRangeExceptionminObservers is non-positive.

6. Overload

public static IQbservable<TSource> RefCount<TSource>(this IQbservableProvider provider, IConnectableObservable<TSource> source, int minObservers, TimeSpan disconnectDelay, IScheduler scheduler)

Summary: Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
source[IConnectableObservable](#Connectable observable sequence.
minObserversintThe minimum number of observers required to subscribe before establishing the connection to the source.
disconnectDelayTimeSpanThe time span that should be waited before possibly unsubscribing from the connectable observable.
scheduler[IScheduler](#The scheduler to use for delayed unsubscription.

Returns: IQbservable -- An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentOutOfRangeExceptionminObservers is non-positive.