How do I aggregate hot observables which may or may not have subscribers into a new observable and continue to provide all new data to existing subscribers?
As an example, imagine we have some class like this:
class SomeClass
{
IObservable<string> Actions { get; set; } = Observable.Empty<string>();
void AddActionCreator(IObservable<string> creator)
{
Actions = Actions.Merge(creator);
}
}
The problem I am running into is if AddActionCreator
adds a new stream of actions then any previous subscribers of SomeClass.Actions
which subscribed before that new stream is merged will never get the new actions.