public TransferCollection <T> Copy() { TransferCollection <T> copyObj = new TransferCollection <T>(); foreach (var kv in this.transfers) { var transfer = kv.Value; copyObj.AddTransfer((T)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); }
/// <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; }