I have an IObservable which can be implemented in a behavioral, replay, or something similar.
In the following scenario, I do not want the subscriber to choose the last cached value, instead I want it to pick up the next value coming in. Any ideas?
var topic = new behavior topic (1); Subject.OnNext (2); Subject. Subscribe (x = & gt; console; write (x)); Subject.OnNext (3); Note, the number I want to print is 3 ... I think that to get me a new observation or something, "subject" membership is a responsive extension between The methods are to be inserted. .
You should do this:
var topic = new behavior topic (1); Subject.OnNext (2); Subject. Skip (1) // Subscribe (x => console. WrightLine (x)); Subject.OnNext (3);
Comments
Post a Comment