How to make flattened stream of streams hot and connectible in RX.Net?

24 Views Asked by At

I have a reactive emitter that aggregates sources. When a source is added or removed it emits a new collection of observables in a stream. I use this to flatten it out.

stream.Select(e => e.Merge()).Switch();

That's working just fine for subscribers that come before any addition or removal, as they get the new aggregated stream. But I did not manage to make this connectible (hot), so that anybody subscribing at any point in time gets subscribed to the latest aggregated stream.

Even if I add .Publish() and AutoConnect() the result is the same.

0

There are 0 best solutions below