Combining operators
Combining operators combine multiple sequences into a new sequence, eventually with a specific design to reduce message flow.
Combine latest
The CombineLatest
operator produces a new sequence that combines multiple sourcing sequences by joining such messages to produce a new composite message. Kindly consider that anytime each of the source enumerable flows a new message, regardless of being the first or the second sequence, a new composite message will flow throughout the combined latest sequence.
The new sequence will start flowing messages when all the sourcing sequences produce their first message.
Here's an example:
var s6 = new Subject<string>(); var s7 = new Subject<int>(); var clatest = s6.CombineLatest(s7, (x, y) => new { text = x, value = y, }); clatest.Subscribe(x => Console.WriteLine("{0}: {1}", x.text, x.value)); //some message s6.OnNext("Mr. Brown"); &...