I realize this is probably a very stupid question but the documentation on Reactive Extensions is both opaque and scattered.
Suppose I have a class
public class Foo
{
public int FooState {get;set;}
}
and FooState is updated very frequently. This looks like an ideal case for an IObservable, especially since I'll have to track that state in another class.
public class Bar
{
public Foo Foo {get;set;}
private void DoStuffWithFooState()
{
//operate on Foo.FooState here
}
}
Now, I can't change FooState into an IObservable<int> because that would break other stuff that relies on Foo.
What I'd like to do is is declare an IObserver property on Bar that watches FooState.
Isn't this a basic use case? How do I go about it?