public InlineImageViewModel(string contentType, Upload upload, IMessageBus bus, Func<string, IImageView> imageViewCreator) : base(upload) { _imageViewCreator = imageViewCreator; ShowFullSizeImageCommand = new ReactiveCommand( this.ObservableForProperty(vm => vm.File).Select(c => c.Value != null)); ShowFullSizeImageCommand.Subscribe(ViewImage); bus.Listen<FileDownloadedMessage>().Where(msg => msg.Url == Upload.FullUrl) .SubscribeUI(msg => { File = msg.File; ShowAnimated = contentType.Equals("image/gif", StringComparison.OrdinalIgnoreCase); ShowUnanimated = !ShowAnimated; }); bus.SendMessage(new RequestDownloadFileMessage(Upload.FullUrl)); }
public UploadReceivedMessage(Upload upload, Guid correlation) { Upload = upload; Correlation = correlation; }
public FileUploadedMessage(Guid correlationId, string path, Upload upload) : base(correlationId) { Path = path; Upload = upload; }
public FileViewModel(Upload upload) { _upload = upload; }