private bool ShouldAbortTransfer(TransferBase transfer) { lock (_transferLock) //Acquire the transfer lock { return(!Transfers.Contains(transfer)); } }
private void AddTransfer(OneFileTransferModel fileTransferModel) { var fileTransferViewModel = new OneFileTransferViewModel(this, fileTransferModel); if (Transfers.Contains(fileTransferViewModel)) { return; } Transfers.Add(fileTransferViewModel); if (VisualStates.BlockState == FileTransfersVisualStates.TransfersBlockState.Invisible) { VisualStates.BlockState = FileTransfersVisualStates.TransfersBlockState.Open; } }