public void StartUpload(IEnumerable <FileInfo> files) { foreach (var file in files) { var uploadPhotoViewModel = new UploadPhotoViewModel(file, Album.Id); uploadPhotoViewModel.UploadCompleted += uploadPhotoViewModel_UploadCompleted; uploadPhotoViewModel.UploadCanceled += uploadPhotoViewModel_UploadCanceled; _pendingTasks.Enqueue(uploadPhotoViewModel); _archivedTasks.Add(uploadPhotoViewModel); } StartNextPendingTasks(); }
public void StartUpload(IEnumerable<FileInfo> files) { foreach (var file in files) { var uploadPhotoViewModel = new UploadPhotoViewModel(file, Album.Id); uploadPhotoViewModel.UploadCompleted += uploadPhotoViewModel_UploadCompleted; uploadPhotoViewModel.UploadCanceled += uploadPhotoViewModel_UploadCanceled; _pendingTasks.Enqueue(uploadPhotoViewModel); _archivedTasks.Add(uploadPhotoViewModel); } StartNextPendingTasks(); }