Network Status Observer

Mar 9, 2012 at 10:17 PM

I am trying to implement the network status observer as outlined elsewhere, using the INetworkService interface and an observer as per the code below:

        private readonly INetworkService networkService;
        private IDisposable networkStatusObserver;
            this.networkStatusObserver = this.networkService.Status()
                 .Subscribe(networkType => this.NetworkStatus = networkType);


My project has got references to Microsoft.Phone.Reactive and also System.Observable, but I am getting the following error when trying to compile:

Error 2 The call is ambiguous between the following methods or properties: 'Microsoft.Phone.Reactive.ObservableExtensions.Subscribe<WP7Contrib.Communications.NetworkType>(System.IObservable<WP7Contrib.Communications.NetworkType>, System.Action<WP7Contrib.Communications.NetworkType>)' and 'System.ObservableExtensions.Subscribe<WP7Contrib.Communications.NetworkType>(System.IObservable<WP7Contrib.Communications.NetworkType>, System.Action<WP7Contrib.Communications.NetworkType>)'

If I remove references to either of the libraries mentioned other stuff will not compile, has anyone got any pointers/ideas how I could overcome this?  

Been banging my head against a wall for a while on this one.


Mar 15, 2012 at 9:38 PM

Remove the reference to Microsoft.Phone.Reactive - this is no longer supported by MS (big issue found with memory I believe)

Make sure you have references to:




Mar 16, 2012 at 5:34 PM

That's great thanks.

Just need to add the System.Reactive.Linq namespace to the class to get the ObserveOnDispatcher to be resolved and now it all compiles.