/// <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;
        }
Ejemplo n.º 2
0
        /// <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();
        }
        /// <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;
        }