Exemplo n.º 1
0
        public void TransferGroupsFromDriveToDrive(Drive fromDrive, Drive toDrive, IEnumerable <Group> groupsToTransfer)
        {
            _transactionTable.Add(new DriveTransaction(fromDrive, toDrive, groupsToTransfer));
            var addVisitor    = new AddVisitor(groupsToTransfer);
            var removeVisitor = new RemoveVisitor(groupsToTransfer);

            toDrive.Accept(addVisitor);
            fromDrive.Accept(removeVisitor);
        }
        public void TransferGroupsFromDriveToDrive(Drive fromDrive, Drive toDrive, IEnumerable<Group> groupsToTransfer)
        {
            _transactionTable.Add(new DriveTransaction(fromDrive, toDrive, groupsToTransfer));
            var addVisitor = new AddVisitor(groupsToTransfer);
            var removeVisitor = new RemoveVisitor(groupsToTransfer);

            toDrive.Accept(addVisitor);
            fromDrive.Accept(removeVisitor);
        }