public ValidationOutcomeProcessor(
            IValidationStorageService validationStorageService,
            IPackageValidationEnqueuer validationEnqueuer,
            IStatusProcessor <T> validatedPackageProcessor,
            IValidationFileService packageFileService,
            IOptionsSnapshot <ValidationConfiguration> validationConfigurationAccessor,
            IMessageService <T> messageService,
            ITelemetryService telemetryService,
            ILogger <ValidationOutcomeProcessor <T> > logger)
        {
            _validationStorageService = validationStorageService ?? throw new ArgumentNullException(nameof(validationStorageService));
            _validationEnqueuer       = validationEnqueuer ?? throw new ArgumentNullException(nameof(validationEnqueuer));
            _packageStateProcessor    = validatedPackageProcessor ?? throw new ArgumentNullException(nameof(validatedPackageProcessor));
            _packageFileService       = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService));
            if (validationConfigurationAccessor == null)
            {
                throw new ArgumentNullException(nameof(validationConfigurationAccessor));
            }
            _validationConfiguration = validationConfigurationAccessor.Value
                                       ?? throw new ArgumentException($"The {nameof(validationConfigurationAccessor)}.Value property cannot be null",
                                                                      nameof(validationConfigurationAccessor));
            _messageService   = messageService ?? throw new ArgumentNullException(nameof(messageService));
            _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
            _logger           = logger ?? throw new ArgumentNullException(nameof(logger));

            _validationConfigurationsByName = _validationConfiguration.Validations.ToDictionary(v => v.Name);
        }
 public SymbolsStatusProcessor(
     IEntityService <SymbolPackage> galleryPackageService,
     IValidationFileService packageFileService,
     IValidatorProvider validatorProvider,
     ITelemetryService telemetryService,
     ILogger <EntityStatusProcessor <SymbolPackage> > logger)
     : base(galleryPackageService, packageFileService, validatorProvider, telemetryService, logger)
 {
 }
 public PackageStatusProcessor(
     IEntityService <Package> galleryPackageService,
     IValidationFileService packageFileService,
     IValidatorProvider validatorProvider,
     ITelemetryService telemetryService,
     ILogger <EntityStatusProcessor <Package> > logger,
     ICoreLicenseFileService coreLicenseFileService)
     : base(galleryPackageService, packageFileService, validatorProvider, telemetryService, logger)
 {
     _coreLicenseFileService = coreLicenseFileService ?? throw new ArgumentNullException(nameof(coreLicenseFileService));
 }
 public EntityStatusProcessor(
     IEntityService <T> galleryPackageService,
     IValidationFileService packageFileService,
     IValidatorProvider validatorProvider,
     ITelemetryService telemetryService,
     ILogger <EntityStatusProcessor <T> > logger)
 {
     _galleryPackageService = galleryPackageService ?? throw new ArgumentNullException(nameof(galleryPackageService));
     _packageFileService    = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService));
     _validatorProvider     = validatorProvider ?? throw new ArgumentNullException(nameof(validatorProvider));
     _telemetryService      = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 5
0
 public ValidationStorageService(
     IValidationEntitiesContext validationContext,
     IValidationFileService packageFileService,
     IValidatorProvider validatorProvider,
     ITelemetryService telemetryService,
     ILogger <ValidationStorageService> logger)
 {
     _validationContext  = validationContext ?? throw new ArgumentNullException(nameof(validationContext));
     _packageFileService = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService));
     _validatorProvider  = validatorProvider ?? throw new ArgumentNullException(nameof(validatorProvider));
     _telemetryService   = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 6
0
 public PackageStatusProcessor(
     IEntityService <Package> galleryPackageService,
     IValidationFileService packageFileService,
     IValidatorProvider validatorProvider,
     ITelemetryService telemetryService,
     IOptionsSnapshot <SasDefinitionConfiguration> options,
     ILogger <EntityStatusProcessor <Package> > logger,
     ICoreLicenseFileService coreLicenseFileService,
     ICoreReadmeFileService coreReadmeFileService)
     : base(galleryPackageService, packageFileService, validatorProvider, telemetryService, logger)
 {
     _coreLicenseFileService     = coreLicenseFileService ?? throw new ArgumentNullException(nameof(coreLicenseFileService));
     _sasDefinitionConfiguration = (options == null || options.Value == null) ? new SasDefinitionConfiguration() : options.Value;
     _coreReadmeFileService      = coreReadmeFileService ?? throw new ArgumentNullException(nameof(coreReadmeFileService));
 }
Exemplo n.º 7
0
 public ValidationSetProvider(
     IValidationStorageService validationStorageService,
     IValidationFileService packageFileService,
     IValidatorProvider validatorProvider,
     IOptionsSnapshot <ValidationConfiguration> validationConfigurationAccessor,
     ITelemetryService telemetryService,
     ILogger <ValidationSetProvider <T> > logger)
 {
     _validationStorageService = validationStorageService ?? throw new ArgumentNullException(nameof(validationStorageService));
     _packageFileService       = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService));
     _validatorProvider        = validatorProvider ?? throw new ArgumentNullException(nameof(validatorProvider));
     if (validationConfigurationAccessor == null)
     {
         throw new ArgumentNullException(nameof(validationConfigurationAccessor));
     }
     _validationConfiguration = validationConfigurationAccessor.Value ?? throw new ArgumentException($"The Value property cannot be null", nameof(validationConfigurationAccessor));
     _telemetryService        = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }