rx

MethodCallExpression with IObservable throws access denied exception to System.CoreEx

I have a MethodCallExpression object from which I'm trying to return a IObservable<Thing> instance using the Reactive Extensions framework. private IObservable<Thing> GetThing(Expression<Func<Thing>> expression) { Func<Thing> method = expression.Compile() var observable = Observable.FromAsyncPattern<Thing>(method.BeginInvoke, meth...

Observable<string> updated events?

I'm just trying to do a simple event handler on a string variable, so that if the string changes, it will do a Console.WriteLine (using the new Reactive library from MS (Rx)) The issue that I have is that it will display the first bit when I instantiate the class ("RandomGuid : Mine?"), but after that, none of the stuff I change after...

Help with an RX simple Sample for this

Hi guys, I searched for a sample for this, but could not find something that explains clearly how to set it up using RX: I have this requirement... In a WPF app, i have a list box A dispatcher timer routine adds some random numbers to a local List every say 2 seconds Now i want to setup an observable/observer to watch this List<int> a...

Problem combining Reactive Framework (Rx) queries to provide correct UI behaviour

I'm trying to remove the more tradition event handlers from a Silverlight application in favour of using a number of Rx queries to provide a better, easier to manage, behavioural abstraction. The problem that I need to solve, but can't quite crack it the way I want, is getting the behaviour of a search screen working. It's pretty standa...

Observable.Delay calling Dispose before OnNext is fired

I am having problem understanding how Observable.Delay works and when the Dispose() is meant to be called. Would anyone familiar with Rx be able to help please? The following code snippet: static void Main(string[] args) { var oneNumberEveryFiveSeconds = new SomeObservable(); // Instant echo oneNumberEve...

Should I use List<IObserver> or simply Action<T> to keep track of an IObservable's subscribers?

I'm implementing the IObservable<T> interface on some classes. I used Reflector to figure out how this is typically done in Rx. Concerning how an observable keeps track of its subscribers and notifies them via their OnNext method, I stumbled upon code similar to this: private List<Observer<T>> observers; // subscribe a new observer: pu...

Rx: Ignoring updates caused by Subscribers

I'm having problems figuring out how to do this. I have two instances (source & target) that implement INotifyPropertyChanged and I'm tracking the PropertyChanged event for both. What I want to do is run an action any time source.PropertyChanged is raised until target.PropertyChanged is raised. I can do that just fine like this: INotify...