Exemple #1
0
 public UsersController(
     ICuratedFeedService feedsQuery,
     IUserService userService,
     IPackageService packageService,
     IPackageOwnerRequestService packageOwnerRequestService,
     IMessageService messageService,
     IAppConfiguration config,
     AuthenticationService authService,
     ICredentialBuilder credentialBuilder,
     IDeleteAccountService deleteAccountService,
     ISupportRequestService supportRequestService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IContentObjectService contentObjectService)
     : base(
         authService,
         feedsQuery,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService)
 {
     _packageOwnerRequestService = packageOwnerRequestService ?? throw new ArgumentNullException(nameof(packageOwnerRequestService));
     _config                = config ?? throw new ArgumentNullException(nameof(config));
     _credentialBuilder     = credentialBuilder ?? throw new ArgumentNullException(nameof(credentialBuilder));
     _deleteAccountService  = deleteAccountService ?? throw new ArgumentNullException(nameof(deleteAccountService));
     _supportRequestService = supportRequestService ?? throw new ArgumentNullException(nameof(supportRequestService));
 }
Exemple #2
0
 public UserService(
     IAppConfiguration config,
     IEntityRepository <User> userRepository,
     IEntityRepository <Credential> credentialRepository,
     IEntityRepository <Organization> organizationRepository,
     IAuditingService auditing,
     IEntitiesContext entitiesContext,
     IContentObjectService contentObjectService,
     ISecurityPolicyService securityPolicyService,
     IDateTimeProvider dateTimeProvider,
     ICredentialBuilder credentialBuilder,
     ITelemetryService telemetryService,
     IDiagnosticsService diagnosticsService)
     : this()
 {
     Config                 = config;
     UserRepository         = userRepository;
     CredentialRepository   = credentialRepository;
     OrganizationRepository = organizationRepository;
     Auditing               = auditing;
     EntitiesContext        = entitiesContext;
     ContentObjectService   = contentObjectService;
     SecurityPolicyService  = securityPolicyService;
     DateTimeProvider       = dateTimeProvider;
     TelemetryService       = telemetryService;
     DiagnosticsSource      = diagnosticsService.SafeGetSource(nameof(UserService));
 }
Exemple #3
0
        public AccountsController(
            AuthenticationService authenticationService,
            IPackageService packageService,
            IMessageService messageService,
            IUserService userService,
            ITelemetryService telemetryService,
            ISecurityPolicyService securityPolicyService,
            ICertificateService certificateService,
            IContentObjectService contentObjectService,
            IMessageServiceConfiguration messageServiceConfiguration,
            IDeleteAccountService deleteAccountService,
            IIconUrlProvider iconUrlProvider,
            IGravatarProxyService gravatarProxy)
        {
            AuthenticationService       = authenticationService ?? throw new ArgumentNullException(nameof(authenticationService));
            PackageService              = packageService ?? throw new ArgumentNullException(nameof(packageService));
            MessageService              = messageService ?? throw new ArgumentNullException(nameof(messageService));
            UserService                 = userService ?? throw new ArgumentNullException(nameof(userService));
            TelemetryService            = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
            SecurityPolicyService       = securityPolicyService ?? throw new ArgumentNullException(nameof(securityPolicyService));
            CertificateService          = certificateService ?? throw new ArgumentNullException(nameof(certificateService));
            ContentObjectService        = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
            MessageServiceConfiguration = messageServiceConfiguration ?? throw new ArgumentNullException(nameof(messageServiceConfiguration));
            DeleteAccountService        = deleteAccountService ?? throw new ArgumentNullException(nameof(deleteAccountService));
            IconUrlProvider             = iconUrlProvider ?? throw new ArgumentNullException(nameof(iconUrlProvider));
            GravatarProxy               = gravatarProxy ?? throw new ArgumentNullException(nameof(gravatarProxy));

            _deleteAccountListPackageItemViewModelFactory = new DeleteAccountListPackageItemViewModelFactory(PackageService, IconUrlProvider);
        }
Exemple #4
0
 public OrganizationsController(
     AuthenticationService authService,
     IMessageService messageService,
     IUserService userService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IPackageService packageService,
     IDeleteAccountService deleteAccountService,
     IContentObjectService contentObjectService,
     IMessageServiceConfiguration messageServiceConfiguration,
     IIconUrlProvider iconUrlProvider)
     : base(
         authService,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService,
         messageServiceConfiguration,
         deleteAccountService,
         iconUrlProvider)
 {
 }
Exemple #5
0
 public OrganizationsController(
     AuthenticationService authService,
     IMessageService messageService,
     IUserService userService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IPackageService packageService,
     IDeleteAccountService deleteAccountService,
     IContentObjectService contentObjectService,
     IMessageServiceConfiguration messageServiceConfiguration,
     IIconUrlProvider iconUrlProvider,
     IFeatureFlagService features,
     IGravatarProxyService gravatarProxy)
     : base(
         authService,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService,
         messageServiceConfiguration,
         deleteAccountService,
         iconUrlProvider,
         gravatarProxy)
 {
     _features = features ?? throw new ArgumentNullException(nameof(features));
 }
        public TyposquattingService(IContentObjectService contentObjectService, IPackageService packageService, IReservedNamespaceService reservedNamespaceService, ITelemetryService telemetryService)
        {
            _contentObjectService     = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
            _packageService           = packageService ?? throw new ArgumentNullException(nameof(packageService));
            _reservedNamespaceService = reservedNamespaceService ?? throw new ArgumentNullException(nameof(reservedNamespaceService));
            _telemetryService         = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));

            TyposquattingCheckListLength = _contentObjectService.TyposquattingConfiguration.PackageIdChecklistLength;
        }
 public PagesController(IContentService contentService,
                        IContentObjectService contentObjectService,
                        IMessageService messageService,
                        ISupportRequestService supportRequestService)
 {
     _contentService        = contentService;
     _contentObjectService  = contentObjectService;
     _messageService        = messageService;
     _supportRequestService = supportRequestService;
 }
 public TyposquattingService(IContentObjectService contentObjectService,
                             IPackageService packageService,
                             IReservedNamespaceService reservedNamespaceService,
                             ITelemetryService telemetryService,
                             ITyposquattingCheckListCacheService typosquattingCheckListCacheService)
 {
     _contentObjectService               = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
     _packageService                     = packageService ?? throw new ArgumentNullException(nameof(packageService));
     _reservedNamespaceService           = reservedNamespaceService ?? throw new ArgumentNullException(nameof(reservedNamespaceService));
     _telemetryService                   = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _typosquattingCheckListCacheService = typosquattingCheckListCacheService ?? throw new ArgumentNullException(nameof(typosquattingCheckListCacheService));
 }
 public AuthenticationController(
     AuthenticationService authService,
     IUserService userService,
     IMessageService messageService,
     ICredentialBuilder credentialBuilder,
     IContentObjectService contentObjectService)
 {
     _authService          = authService ?? throw new ArgumentNullException(nameof(authService));
     _userService          = userService ?? throw new ArgumentNullException(nameof(userService));
     _messageService       = messageService ?? throw new ArgumentNullException(nameof(messageService));
     _credentialBuilder    = credentialBuilder ?? throw new ArgumentNullException(nameof(credentialBuilder));
     _contentObjectService = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
 }
 public PagesController(
     IContentService contentService,
     IContentObjectService contentObjectService,
     IMessageService messageService,
     ISupportRequestService supportRequestService,
     IMessageServiceConfiguration messageServiceConfiguration)
 {
     _contentService              = contentService ?? throw new ArgumentNullException(nameof(contentService));
     _contentObjectService        = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
     _messageService              = messageService ?? throw new ArgumentNullException(nameof(messageService));
     _supportRequestService       = supportRequestService ?? throw new ArgumentNullException(nameof(supportRequestService));
     _messageServiceConfiguration = messageServiceConfiguration ?? throw new ArgumentNullException(nameof(messageServiceConfiguration));
 }
Exemple #11
0
 public HijackSearchServiceFactory(
     HttpContextBase httpContext,
     IFeatureFlagService featureFlags,
     IContentObjectService contentObjectService,
     ISearchService search,
     ISearchService previewSearch)
 {
     _httpContext          = httpContext ?? throw new ArgumentNullException(nameof(httpContext));
     _featureFlags         = featureFlags ?? throw new ArgumentNullException(nameof(featureFlags));
     _contentObjectService = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
     _search        = search ?? throw new ArgumentNullException(nameof(search));
     _previewSearch = previewSearch ?? throw new ArgumentNullException(nameof(previewSearch));
 }
 public SymbolPackageUploadService(
     ISymbolPackageService symbolPackageService,
     ISymbolPackageFileService symbolPackageFileService,
     IEntitiesContext entitiesContext,
     IValidationService validationService,
     IPackageService packageService,
     ITelemetryService telemetryService,
     IContentObjectService contentObjectService)
 {
     _symbolPackageService     = symbolPackageService ?? throw new ArgumentNullException(nameof(symbolPackageService));
     _symbolPackageFileService = symbolPackageFileService ?? throw new ArgumentNullException(nameof(symbolPackageFileService));
     _entitiesContext          = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext));
     _validationService        = validationService ?? throw new ArgumentNullException(nameof(validationService));
     _packageService           = packageService ?? throw new ArgumentNullException(nameof(packageService));
     _telemetryService         = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _contentObjectService     = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
 }
Exemple #13
0
 public PackageService(
     IEntityRepository <PackageRegistration> packageRegistrationRepository,
     IEntityRepository <Package> packageRepository,
     IEntityRepository <Certificate> certificateRepository,
     IAuditingService auditingService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     IEntitiesContext entitiesContext,
     IContentObjectService contentObjectService)
     : base(packageRepository, packageRegistrationRepository, certificateRepository)
 {
     _auditingService       = auditingService ?? throw new ArgumentNullException(nameof(auditingService));
     _telemetryService      = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _securityPolicyService = securityPolicyService ?? throw new ArgumentNullException(nameof(securityPolicyService));
     _entitiesContext       = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext));
     _contentObjectService  = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
 }
 public UserService(
     IAppConfiguration config,
     IEntityRepository <User> userRepository,
     IEntityRepository <Credential> credentialRepository,
     IAuditingService auditing,
     IEntitiesContext entitiesContext,
     IContentObjectService contentObjectService,
     ISecurityPolicyService securityPolicyService)
     : this()
 {
     Config                = config;
     UserRepository        = userRepository;
     CredentialRepository  = credentialRepository;
     Auditing              = auditing;
     EntitiesContext       = entitiesContext;
     ContentObjectService  = contentObjectService;
     SecurityPolicyService = securityPolicyService;
 }
 public CookieBasedABTestService(
     HttpContextBase httpContext,
     IFeatureFlagService featureFlagService,
     IABTestEnrollmentFactory enrollmentFactory,
     IContentObjectService contentObjectService,
     ICookieComplianceService cookieComplianceService,
     ITelemetryService telemetryService,
     ILogger <CookieBasedABTestService> logger)
 {
     _httpContext             = httpContext ?? throw new ArgumentNullException(nameof(httpContext));
     _featureFlagService      = featureFlagService ?? throw new ArgumentNullException(nameof(featureFlagService));
     _enrollmentFactory       = enrollmentFactory ?? throw new ArgumentNullException(nameof(enrollmentFactory));
     _contentObjectService    = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
     _cookieComplianceService = cookieComplianceService ?? throw new ArgumentNullException(nameof(cookieComplianceService));
     _telemetryService        = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
     _lazyEnrollment = new Lazy <ABTestEnrollment>(DetermineEnrollment);
 }
Exemple #16
0
        public AuthenticationService(
            IEntitiesContext entities, IAppConfiguration config, IDiagnosticsService diagnostics,
            IAuditingService auditing, IEnumerable <Authenticator> providers, ICredentialBuilder credentialBuilder,
            ICredentialValidator credentialValidator, IDateTimeProvider dateTimeProvider, ITelemetryService telemetryService,
            IContentObjectService contentObjectService)
        {
            InitCredentialFormatters();

            Entities              = entities ?? throw new ArgumentNullException(nameof(entities));
            _config               = config ?? throw new ArgumentNullException(nameof(config));
            _trace                = diagnostics?.SafeGetSource("AuthenticationService") ?? throw new ArgumentNullException(nameof(diagnostics));
            Auditing              = auditing ?? throw new ArgumentNullException(nameof(auditing));;
            Authenticators        = providers?.ToDictionary(p => p.Name, StringComparer.OrdinalIgnoreCase) ?? throw new ArgumentNullException(nameof(providers));
            _credentialBuilder    = credentialBuilder ?? throw new ArgumentNullException(nameof(credentialBuilder));
            _credentialValidator  = credentialValidator ?? throw new ArgumentNullException(nameof(credentialValidator));
            _dateTimeProvider     = dateTimeProvider ?? throw new ArgumentNullException(nameof(dateTimeProvider));
            _telemetryService     = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
            _contentObjectService = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
        }
Exemple #17
0
 public AccountsController(
     AuthenticationService authenticationService,
     ICuratedFeedService curatedFeedService,
     IPackageService packageService,
     IMessageService messageService,
     IUserService userService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IContentObjectService contentObjectService)
 {
     AuthenticationService = authenticationService ?? throw new ArgumentNullException(nameof(authenticationService));
     CuratedFeedService    = curatedFeedService ?? throw new ArgumentNullException(nameof(curatedFeedService));
     PackageService        = packageService ?? throw new ArgumentNullException(nameof(packageService));
     MessageService        = messageService ?? throw new ArgumentNullException(nameof(messageService));
     UserService           = userService ?? throw new ArgumentNullException(nameof(userService));
     TelemetryService      = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     SecurityPolicyService = securityPolicyService ?? throw new ArgumentNullException(nameof(securityPolicyService));
     CertificateService    = certificateService ?? throw new ArgumentNullException(nameof(certificateService));
     ContentObjectService  = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
 }
        public UsersController(
            IUserService userService,
            IPackageService packageService,
            IPackageOwnerRequestService packageOwnerRequestService,
            IMessageService messageService,
            IAppConfiguration config,
            AuthenticationService authService,
            ICredentialBuilder credentialBuilder,
            IDeleteAccountService deleteAccountService,
            ISupportRequestService supportRequestService,
            ITelemetryService telemetryService,
            ISecurityPolicyService securityPolicyService,
            ICertificateService certificateService,
            IContentObjectService contentObjectService,
            IFeatureFlagService featureFlagService,
            IMessageServiceConfiguration messageServiceConfiguration,
            IIconUrlProvider iconUrlProvider)
            : base(
                authService,
                packageService,
                messageService,
                userService,
                telemetryService,
                securityPolicyService,
                certificateService,
                contentObjectService,
                messageServiceConfiguration,
                deleteAccountService,
                iconUrlProvider)
        {
            _packageOwnerRequestService = packageOwnerRequestService ?? throw new ArgumentNullException(nameof(packageOwnerRequestService));
            _config                = config ?? throw new ArgumentNullException(nameof(config));
            _credentialBuilder     = credentialBuilder ?? throw new ArgumentNullException(nameof(credentialBuilder));
            _supportRequestService = supportRequestService ?? throw new ArgumentNullException(nameof(supportRequestService));
            _featureFlagService    = featureFlagService ?? throw new ArgumentNullException(nameof(featureFlagService));

            _listPackageItemRequiredSignerViewModelFactory = new ListPackageItemRequiredSignerViewModelFactory(securityPolicyService, iconUrlProvider);
            _listPackageItemViewModelFactory = new ListPackageItemViewModelFactory(iconUrlProvider);
        }
 public UserService(
     IAppConfiguration config,
     IEntityRepository <User> userRepository,
     IEntityRepository <Credential> credentialRepository,
     IEntityRepository <Organization> organizationRepository,
     IAuditingService auditing,
     IEntitiesContext entitiesContext,
     IContentObjectService contentObjectService,
     ISecurityPolicyService securityPolicyService,
     IDateTimeProvider dateTimeProvider,
     ICredentialBuilder credentialBuilder)
     : this()
 {
     Config                 = config;
     UserRepository         = userRepository;
     CredentialRepository   = credentialRepository;
     OrganizationRepository = organizationRepository;
     Auditing               = auditing;
     EntitiesContext        = entitiesContext;
     ContentObjectService   = contentObjectService;
     SecurityPolicyService  = securityPolicyService;
     DateTimeProvider       = dateTimeProvider;
 }
Exemple #20
0
 public OrganizationsController(
     AuthenticationService authService,
     ICuratedFeedService curatedFeedService,
     IMessageService messageService,
     IUserService userService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IPackageService packageService,
     IDeleteAccountService deleteAccountService,
     IContentObjectService contentObjectService)
     : base(
         authService,
         curatedFeedService,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService)
 {
     DeleteAccountService = deleteAccountService;
 }
Exemple #21
0
 public ImageDomainValidator(IContentObjectService contentObjectService)
 {
     _contentObjectService = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
 }