,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
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
TResult | The type of the elements in the result sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence that will be shared in the selector function. |
selector | Func | Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or selector is null. |