How can I do this?
I have a code that does:
new int[]{1,2,3}.ToObservable().Subscribe(myObserver);
The problem is this first call is a cold observable so that on another call like this:
new int[]{4,5,6}.ToObservable().Subscribe(myObserver);
myObserver does not trigger onNext at all. Apparently because the first call publishes 1,2,3, END. I don’t want the observable to call “END”, because I want to continue subscribing later on. Is there a function that easily does this for me?
You would need to do something like this:
The key is to do a
.Concat(Observable.Never<int>())on the observable to prevent it ever ending.