private async Task BackupFromPackagesContainerAsync(ICorePackageFileService fileService, Package package) { using (var packageStream = await fileService.DownloadPackageFileAsync(package)) { if (packageStream != null) { await fileService.StorePackageFileInBackupLocationAsync(package, packageStream); } } }
public ValidationSetProcessor( IValidatorProvider validatorProvider, IValidationStorageService validationStorageService, IOptionsSnapshot <ValidationConfiguration> validationConfigurationAccessor, ICorePackageFileService packageFileService, ILogger <ValidationSetProcessor> logger) { _validatorProvider = validatorProvider ?? throw new ArgumentNullException(nameof(validatorProvider)); _validationStorageService = validationStorageService ?? throw new ArgumentNullException(nameof(validationStorageService)); if (validationConfigurationAccessor == null) { throw new ArgumentNullException(nameof(validationConfigurationAccessor)); } _validationConfiguration = validationConfigurationAccessor.Value ?? throw new ArgumentException($"The Value property cannot be null", nameof(validationConfigurationAccessor)); _packageFileService = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public ValidationOutcomeProcessor( ICorePackageService galleryPackageService, ICorePackageFileService packageFileService, IPackageValidationEnqueuer validationEnqueuer, IOptionsSnapshot <ValidationConfiguration> validationConfigurationAccessor, ILogger <ValidationOutcomeProcessor> logger) { _galleryPackageService = galleryPackageService ?? throw new ArgumentNullException(nameof(galleryPackageService)); _packageFileService = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService)); _validationEnqueuer = validationEnqueuer ?? throw new ArgumentNullException(nameof(validationEnqueuer)); if (validationConfigurationAccessor == null) { throw new ArgumentNullException(nameof(validationConfigurationAccessor)); } _validationConfiguration = validationConfigurationAccessor.Value ?? throw new ArgumentException($"The {nameof(validationConfigurationAccessor)}.Value property cannot be null", nameof(validationConfigurationAccessor)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }