Beispiel #1
0
        private async Task RemovePackageOwnershipRequests(User user)
        {
            var requests = _packageOwnershipManagementService.GetPackageOwnershipRequests(newOwner: user).ToList();

            foreach (var request in requests)
            {
                await _packageOwnershipManagementService.DeletePackageOwnershipRequestAsync(request.PackageRegistration, request.NewOwner);
            }
        }
        private async Task RemovePackageOwnershipRequests(User user)
        {
            var toRequests = _packageOwnershipManagementService
                             .GetPackageOwnershipRequests(newOwner: user)
                             .ToList();

            var fromRequests = _packageOwnershipManagementService
                               .GetPackageOwnershipRequests(requestingOwner: user)
                               .ToList();

            var requests = toRequests.Concat(fromRequests).ToList();

            foreach (var request in requests)
            {
                await _packageOwnershipManagementService.DeletePackageOwnershipRequestAsync(request.PackageRegistration, request.NewOwner, commitChanges : false);
            }
        }