private void RequestUpload(RequestUploadMessage obj) { CallApi(() => _api.GetUpload(obj.RoomId, obj.MessageId), upload => _bus.SendMessage(new UploadReceivedMessage(upload, obj.Correlation))); }
public InlineUploadViewModel(IMessageBus bus, Message message, Func<string, IImageView> imageViewCreator) { _bus = bus; _imageViewCreator = imageViewCreator; var requestUploadMessage = new RequestUploadMessage(message.RoomId, message.Id); _bus.Listen<UploadReceivedMessage>().Where(msg => msg.Correlation == requestUploadMessage.Correlation) .SubscribeUI(UploadReceived); _bus.SendMessage(requestUploadMessage); }