O'Reilly logo

Programming Reactive Extensions and LINQ by Paul Betts, Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calling Web Services in XAML Using ReactiveUI

Remember from the previous sections that an IObservable can be used as a future, a “box” that will eventually contain the result of a web service call or other asynchronous function, or the error information. To this end, we’d really like our web service calls to all be vaguely of the following form:

IObservable<Something> CoolWebServiceCall(object Param1, object Param2 / *etc*/);

Recalling back to previous chapters, we're going to use the Observable.FromAsyncPattern in order to map a Begin/End pair of methods into an Rx async method.

An Important Note on Silverlight

Silverlight's web service generated client code does something a bit annoying—it hides away the BeginXXXX/EndXXXX calls, presumably ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required