public IObservable<Destination[]> GetAllStops() { return Observable.Defer(() => { var x = new Generated.DublinBusRTPIServiceSoapClient(new BasicHttpBinding() { MaxBufferSize=2147483647, MaxReceivedMessageSize=2147483647 }, new EndpointAddress(new Uri("http://rtpi.dublinbus.biznetservers.com/DublinBusRTPIService.asmx"))); var o = Observable.FromEvent<GetAllDestinationsCompletedEventArgs>(x, "GetAllDestinationsCompleted") .Select(res => res.EventArgs.Result.Destinations); x.GetAllDestinationsAsync(); return o; }); }
public IObservable <Destination[]> GetAllStops() { return(Observable.Defer(() => { var x = new Generated.DublinBusRTPIServiceSoapClient(new BasicHttpBinding() { MaxBufferSize = 2147483647, MaxReceivedMessageSize = 2147483647 }, new EndpointAddress(new Uri("http://rtpi.dublinbus.biznetservers.com/DublinBusRTPIService.asmx"))); var o = Observable.FromEvent <GetAllDestinationsCompletedEventArgs>(x, "GetAllDestinationsCompleted") .Select(res => res.EventArgs.Result.Destinations); x.GetAllDestinationsAsync(); return o; })); }