Skip to content

,System.Func,System.IObservable{--1}})}

ObservableEx.Let(IObservable, Func, IObservable>) method

Defined in

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

Applies to

netstandard2.0

Attributes: [Experimental]

public static IObservable<TResult> Let<TSource, TResult>(this IObservable<TSource> source, Func<IObservable<TSource>, IObservable<TResult>> selector)

Summary: Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. This operator allows for a fluent style of writing queries that use the same sequence multiple times.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.
TResultThe type of the elements in the result sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence that will be shared in the selector function.
selectorFunc, IObservable>Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.

Returns: IObservable -- An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or selector is null.