public void LoadAllTransactionImages(int transactionId, Action<Exception> callback) { //ICollection<TransactionImage> existing = null; App.Instance.StaticDataOnlineStatus = App.Instance.StaticServiceData.SetServerStatus(status => { if (status != Model.StaticServiceData.ServerStatus.Ok) { //## doesn't need to get anything from cache. Images are retrieved by the transaction callback(null); } else { try { var client = new MainClient(); latestState = Guid.NewGuid().ToString(); client.GetImagesForTransactionCompleted += (sender, completedEventArgs) => { if (completedEventArgs.Error == null) SetupTransactionImageList(completedEventArgs.Result, transactionId); callback(completedEventArgs.Error); }; client.GetImagesForTransactionAsync(transactionId, latestState); } catch (Exception ex) { //var msg = string.Format("There was an error accessing the weather service.\n\r{0}", ex.Message); callback(ex); } } }); }