/// <summary> /// Gets a static snapshot of this transfer checkpoint /// </summary> /// <returns>A snapshot of current transfer checkpoint</returns> internal TransferCheckpoint Copy() { TransferCheckpoint copyObj = new TransferCheckpoint(); foreach (var kvPair in this.transfers) { SingleObjectTransfer transfer = kvPair.Value as SingleObjectTransfer; if (transfer != null) { copyObj.AddTransfer(transfer.Copy()); } } return(copyObj); }
/// <summary> /// Gets a static snapshot of this transfer checkpoint /// </summary> /// <returns>A snapshot of current transfer checkpoint</returns> public TransferCollection Copy() { TransferCollection copyObj = new TransferCollection(); foreach (var kv in this.transfers) { SingleObjectTransfer transfer = kv.Value as SingleObjectTransfer; if (transfer != null) { copyObj.AddTransfer(transfer.Copy()); continue; } DirectoryTransfer transfer2 = kv.Value as DirectoryTransfer; if (transfer2 != null) { copyObj.AddTransfer(transfer2.Copy()); continue; } } return(copyObj); }