How do I get an IObservable to push the newest value upon subscription
问题 Usually when you subscribe to the changes of a value you are also interested in knowing the initial value. I want my IObservable to cache the latest (or initial) value and push that value on subscription. When using plain events I often end up with code that looks like x.SomeEvent += SomeEventHandler; SomeEventHandler(x, EventArgs.Empty); Using IObservable I was hoping to wrap the event with something that pushes the initial value. If I have multiple subscribers they should receive the newest