I often find that I want to use Publish().RefCount() to protect my sources.
For example, when translating some incoming JOON service into two IObservable properties:
var anon = source.Select(TranslateToAnonObject); this.Xs = anon.Select(GetXFromAnonObject); this.Ys = anon.Select(GetYFromAnonObject);
To avoid doing the translation twice, I would have the desire to put Publish().RefCount() for defining anon.
And the same for both property values ββso as not to perform Get.. functions separately for each subscriber.
The fact is that he reaches such an extent that I cannot see many situations in which I would not want this. But if it was right, it would certainly be a default in Rx. What am I thinking wrong?
(Thinks: Is it because I almost exclusively work with hot observables?)
source share