Esempio n. 1
0
        private const long MaxFileSizeBytes          = 5242880; // 5MB

        public AdminGroupService(ISystemClock systemClock,
                                 ILogger <AdminGroupService> logger,
                                 IPermissionsService permissionsService,
                                 IImageBlobStorageProvider blobStorageProvider,
                                 IFileTypeValidator fileTypeValidator,
                                 IGroupImageService imageService,
                                 IGroupCommand groupCommand,
                                 IHtmlSanitizer htmlSanitizer,
                                 IContentService contentService)
        {
            _systemClock         = systemClock ?? throw new ArgumentNullException(nameof(systemClock));
            _blobStorageProvider = blobStorageProvider ?? throw new ArgumentNullException(nameof(blobStorageProvider));
            _permissionsService  = permissionsService ?? throw new ArgumentNullException(nameof(permissionsService));
            _fileTypeValidator   = fileTypeValidator ?? throw new ArgumentNullException(nameof(fileTypeValidator));
            _groupCommand        = groupCommand ?? throw new ArgumentNullException(nameof(groupCommand));
            _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
            _imageService   = imageService ?? throw new ArgumentNullException(nameof(imageService));
            _htmlSanitizer  = htmlSanitizer ?? throw new ArgumentNullException(nameof(htmlSanitizer));
            _contentService = contentService ?? throw new ArgumentNullException(nameof(contentService));
        }
Esempio n. 2
0
        public UserService(ILogger <UserService> logger,
                           ISystemClock systemClock,
                           IPermissionsService permissionsService,
                           IUserAdminDataProvider userAdminDataProvider,
                           IUserCommand userCommand,
                           IEmailService emailService,
                           IOptionsSnapshot <GovNotifyConfiguration> notifyConfig,
                           IOptionsSnapshot <ApplicationGateway> gatewayConfig,
                           IUserImageService imageService,
                           IImageBlobStorageProvider blobStorageProvider)
        {
            _permissionsService    = permissionsService;
            _userAdminDataProvider = userAdminDataProvider;
            _systemClock           = systemClock;
            _logger              = logger;
            _userCommand         = userCommand;
            _emailService        = emailService;
            _fqdn                = gatewayConfig.Value.FQDN;
            _imageService        = imageService;
            _blobStorageProvider = blobStorageProvider;

            // Notification template Ids
            _registrationEmailId = notifyConfig.Value.RegistrationEmailTemplateId;
        }