There are several extension methods in Reactive UI for getting observables for property changes.
I think I understand WhenAny
and WhenAnyValue
. WhenAny
is for a series of property change notifications where you want the metadata of which object and property had the change, while WhenAnyValue
is for when you really just want the stream of changed values.
First of all, is that an accurate assessment?
What about WhenAnyDynamic
, WhenAnyObservable
, and ObservableForProperty
? I can't really figure out what they're for, or how they're distinct from the first two. Are they all intended for public use? What is their purpose?
Let me demonstrate via code:
WhenAnyDynamic
is like WhenAny but when the things you want to observe aren't constants - you probably won't need it, but RxUI internals does.WhenAnyObservable
lets you get an Observable, but not have to worry about objects changing behind your back. For exampleVersus
WhenAnyObservable is super useful in the View to Subscribe to Commands.
ObservableForProperty
is like WhenAny but doesn't fire when initially subscribed to. You probably should ignore it, it's really just a building block for WhenAny that is around for compatibility reasons.