public UploadItemViewModel(UploadItemBase uploadItem) { if (uploadItem == null) { throw new ArgumentNullException("uploadItem"); } _uploadItem = uploadItem; _uploadItem.ProgressChanged += UploadItem_ProgressChanged; _uploadItem.UploadCompleted += UploadItem_UploadCompleted; }
public UploadEventArgs(UploadItemBase uploadItem, Action beginUpload, Action<Exception> uploadCompleted, Action<long, TimeSpan> uploadProgressChanged) { if (uploadItem == null) { throw new ArgumentNullException("uploadItem"); } if (beginUpload == null) { throw new ArgumentNullException("beginUpload"); } if (uploadCompleted == null) { throw new ArgumentNullException("uploadCompleted"); } if (uploadProgressChanged == null) { throw new ArgumentNullException("uploadProgressChanged"); } UploadItem = uploadItem; BeginUpload = beginUpload; UploadCompleted = uploadCompleted; UploadProgressChanged = uploadProgressChanged; }