Skip to content

Qbservable.Return(IQbservableProvider, TResult) method

Defined in

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

Applies to

netstandard2.0

Overloads

  • 1. public static IQbservable<TResult> Return<TResult>(this IQbservableProvider provider, TResult value)
  • 2. public static IQbservable<TResult> Return<TResult>(this IQbservableProvider provider, TResult value, IScheduler scheduler)

1. Overload

public static IQbservable<TResult> Return<TResult>(this IQbservableProvider provider, TResult value)

Summary: Returns an observable sequence that contains a single element.

Type parameters

NameDescription
TResultThe type of the element that will be returned in the produced sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
valueTResultSingle element in the resulting observable sequence.

Returns: IQbservable -- An observable sequence containing the single specified element.

2. Overload

public static IQbservable<TResult> Return<TResult>(this IQbservableProvider provider, TResult value, IScheduler scheduler)

Summary: Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages.

Type parameters

NameDescription
TResultThe type of the element that will be returned in the produced sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
valueTResultSingle element in the resulting observable sequence.
scheduler[IScheduler](#Scheduler to send the single element on.

Returns: IQbservable -- An observable sequence containing the single specified element.

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler is null.