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 ...

Get Programming Reactive Extensions and LINQ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.