Exemplo n.º 1
0
 public PackageUploadService(
     IPackageService packageService,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IReservedNamespaceService reservedNamespaceService,
     IValidationService validationService,
     IAppConfiguration config,
     ITyposquattingService typosquattingService,
     ITelemetryService telemetryService,
     ICoreLicenseFileService coreLicenseFileService,
     IDiagnosticsService diagnosticsService,
     IFeatureFlagService featureFlagService,
     IPackageVulnerabilityService vulnerabilityService)
 {
     _packageService           = packageService ?? throw new ArgumentNullException(nameof(packageService));
     _packageFileService       = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService));
     _entitiesContext          = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext));
     _reservedNamespaceService = reservedNamespaceService ?? throw new ArgumentNullException(nameof(reservedNamespaceService));
     _validationService        = validationService ?? throw new ArgumentNullException(nameof(validationService));
     _config = config ?? throw new ArgumentNullException(nameof(config));
     _typosquattingService   = typosquattingService ?? throw new ArgumentNullException(nameof(typosquattingService));
     _telemetryService       = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _coreLicenseFileService = coreLicenseFileService ?? throw new ArgumentNullException(nameof(coreLicenseFileService));
     if (diagnosticsService == null)
     {
         throw new ArgumentNullException(nameof(diagnosticsService));
     }
     _trace = diagnosticsService.GetSource(nameof(PackageUploadService));
     _featureFlagService   = featureFlagService ?? throw new ArgumentNullException(nameof(featureFlagService));
     _vulnerabilityService = vulnerabilityService ?? throw new ArgumentNullException(nameof(vulnerabilityService));
 }
 public AdvisoryIngestor(
     IPackageVulnerabilityService packageVulnerabilityService,
     IGitHubVersionRangeParser gitHubVersionRangeParser)
 {
     _packageVulnerabilityService = packageVulnerabilityService ?? throw new ArgumentNullException(nameof(packageVulnerabilityService));
     _gitHubVersionRangeParser    = gitHubVersionRangeParser ?? throw new ArgumentNullException(nameof(gitHubVersionRangeParser));
 }
Exemplo n.º 3
0
 public PackageUploadService(
     IPackageService packageService,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IReservedNamespaceService reservedNamespaceService,
     IValidationService validationService,
     ICoreLicenseFileService coreLicenseFileService,
     IDiagnosticsService diagnosticsService,
     IPackageVulnerabilityService vulnerabilityService,
     IPackageMetadataValidationService metadataValidationService)
 {
     _packageService           = packageService ?? throw new ArgumentNullException(nameof(packageService));
     _packageFileService       = packageFileService ?? throw new ArgumentNullException(nameof(packageFileService));
     _entitiesContext          = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext));
     _reservedNamespaceService = reservedNamespaceService ?? throw new ArgumentNullException(nameof(reservedNamespaceService));
     _validationService        = validationService ?? throw new ArgumentNullException(nameof(validationService));
     _coreLicenseFileService   = coreLicenseFileService ?? throw new ArgumentNullException(nameof(coreLicenseFileService));
     if (diagnosticsService == null)
     {
         throw new ArgumentNullException(nameof(diagnosticsService));
     }
     _vulnerabilityService      = vulnerabilityService ?? throw new ArgumentNullException(nameof(vulnerabilityService));
     _metadataValidationService = metadataValidationService ?? throw new ArgumentNullException(nameof(metadataValidationService));
 }