dotnet / dotnet/reactive

Feature request: SwitchIfEmpty operator

Open
#1,076 1 comment 2 reactions 0 assignees View on GitHub
[area] Rx feature request
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

Hi,

Please implement an operator that walks through a collection of observables and emits all values for the first observable that's not empty:

```c#
public static IObservable SwitchIfEmpty(
this IObservable first, params IObservable[] others);
```

[Here](https://stackoverflow.com/questions/15209932/switch-to-a-different-iobservable-if-the-first-is-empty) is a SO question about that.
[Here](https://github.com/akarnokd/reactive-extensions/blob/master/reactive-extensions/observable/SwitchIfEmpty.cs) is a possible implementation.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.