private MoveOperation InitiateCopy(IFileInfo source, string destination) { MoveOperation copy = _helper.Move(source, destination, true); _copies.TryAdd(copy.Id, copy); var continuation = copy.Task.ContinueWith(t => _copies.TryRemove(copy.Id, out copy)); return(copy); }
private MoveOperation InitiateMove(IFileInfo source, string destination) { MoveOperation move = _helper.Move(source, destination, false); _moves.TryAdd(move.Id, move); var continuation = move.Task.ContinueWith(t => _moves.TryRemove(move.Id, out move)); return(move); }