/// <summary> /// Initializes a new instance of the <see cref="MultipleObjectsTransfer"/> class. /// </summary> /// <param name="other">Another <see cref="MultipleObjectsTransfer"/> object.</param> protected MultipleObjectsTransfer(MultipleObjectsTransfer other) : base(other) { lock (other.lockEnumerateContinuationToken) { // copy enumerator this.enumerateContinuationToken = other.enumerateContinuationToken; // copy transfers this.subTransfers = other.subTransfers.Copy(); } this.subTransfers.OverallProgressTracker.Parent = this.ProgressTracker; }
/// <summary> /// Initializes a new instance of the <see cref="MultipleObjectsTransfer"/> class. /// </summary> /// <param name="other">Another <see cref="MultipleObjectsTransfer"/> object.</param> protected MultipleObjectsTransfer(MultipleObjectsTransfer other) : base(other) { other.progressUpdateLock?.EnterWriteLock(); this.ProgressTracker = other.ProgressTracker.Copy(); lock (other.lockEnumerateContinuationToken) { // copy enumerator this.enumerateContinuationToken = other.enumerateContinuationToken; // copy transfers this.subTransfers = other.subTransfers.Copy(); } this.subTransfers.OverallProgressTracker.Parent = this.ProgressTracker; other.progressUpdateLock?.ExitWriteLock(); }