Example #1
0
        public AvatarService(ILogger <AvatarService> logger,
                             GRA.Abstract.IDateTimeProvider dateTimeProvider,
                             IUserContextProvider userContextProvider,
                             IAvatarBundleRepository avatarBundleRepository,
                             IAvatarColorRepository avatarColorRepository,
                             IAvatarElementRepository avatarElementRepository,
                             IAvatarItemRepository avatarItemRepository,
                             IAvatarLayerRepository avatarLayerRepository,
                             IJobRepository jobRepository,
                             LanguageService languageService,
                             ITriggerRepository triggerRepository,
                             IPathResolver pathResolver)
            : base(logger, dateTimeProvider, userContextProvider)
        {
            _avatarBundleRepository = avatarBundleRepository
                                      ?? throw new ArgumentNullException(nameof(avatarBundleRepository));
            _avatarColorRepository = avatarColorRepository
                                     ?? throw new ArgumentNullException(nameof(avatarColorRepository));
            _avatarElementRepository = avatarElementRepository
                                       ?? throw new ArgumentNullException(nameof(avatarElementRepository));
            _avatarItemRepository = avatarItemRepository
                                    ?? throw new ArgumentNullException(nameof(avatarItemRepository));
            _avatarLayerRepository = avatarLayerRepository
                                     ?? throw new ArgumentNullException(nameof(avatarLayerRepository));
            _jobRepository = jobRepository
                             ?? throw new ArgumentNullException(nameof(jobRepository));
            _languageService = languageService
                               ?? throw new ArgumentNullException(nameof(languageService));
            _triggerRepository = triggerRepository
                                 ?? throw new ArgumentNullException(nameof(triggerRepository));
            _pathResolver = pathResolver
                            ?? throw new ArgumentNullException(nameof(pathResolver));

            SetManagementPermission(Permission.ManageAvatars);
        }
Example #2
0
 public ChallengeService(ILogger <ChallengeService> logger,
                         GRA.Abstract.IDateTimeProvider dateTimeProvider,
                         IUserContextProvider userContextProvider,
                         IBadgeRepository badgeRepository,
                         IBranchRepository branchRepository,
                         ICategoryRepository categoryRepository,
                         IChallengeRepository challengeRepository,
                         IChallengeGroupRepository challengeGroupRepository,
                         IChallengeTaskRepository challengeTaskRepository,
                         IEventRepository eventRepository,
                         IPathResolver pathResolver,
                         ITriggerRepository triggerRepository,
                         IUserRepository userRepository) : base(logger, dateTimeProvider, userContextProvider)
 {
     _badgeRepository     = Require.IsNotNull(badgeRepository, nameof(badgeRepository));
     _branchRepository    = Require.IsNotNull(branchRepository, nameof(branchRepository));
     _categoryRepository  = Require.IsNotNull(categoryRepository, nameof(categoryRepository));
     _challengeRepository = Require.IsNotNull(challengeRepository,
                                              nameof(challengeRepository));
     _challengeGroupRepository = Require.IsNotNull(challengeGroupRepository,
                                                   nameof(challengeGroupRepository));
     _challengeTaskRepository = Require.IsNotNull(challengeTaskRepository,
                                                  nameof(challengeTaskRepository));
     _eventRepository   = Require.IsNotNull(eventRepository, nameof(eventRepository));
     _pathResolver      = Require.IsNotNull(pathResolver, nameof(pathResolver));
     _triggerRepository = Require.IsNotNull(triggerRepository, nameof(triggerRepository));
     _userRepository    = Require.IsNotNull(userRepository, nameof(userRepository));
 }
Example #3
0
        public AvatarService(ILogger <AvatarService> logger,
                             GRA.Abstract.IDateTimeProvider dateTimeProvider,
                             IUserContextProvider userContextProvider,
                             IAvatarBundleRepository avatarBundleRepository,
                             IAvatarColorRepository avatarColorRepository,
                             IAvatarElementRepository avatarElementRepository,
                             IAvatarItemRepository avatarItemRepository,
                             IAvatarLayerRepository avatarLayerRepository,
                             ITriggerRepository triggerRepository,
                             IPathResolver pathResolver)
            : base(logger, dateTimeProvider, userContextProvider)
        {
            _avatarBundleRepository = Require.IsNotNull(avatarBundleRepository,
                                                        nameof(avatarBundleRepository));
            _avatarColorRepository = Require.IsNotNull(avatarColorRepository,
                                                       nameof(avatarColorRepository));
            _avatarElementRepository = Require.IsNotNull(avatarElementRepository,
                                                         nameof(avatarElementRepository));
            _avatarItemRepository = Require.IsNotNull(avatarItemRepository,
                                                      nameof(avatarItemRepository));
            _avatarLayerRepository = Require.IsNotNull(avatarLayerRepository,
                                                       nameof(avatarLayerRepository));
            _triggerRepository = Require.IsNotNull(triggerRepository, nameof(triggerRepository));
            _pathResolver      = Require.IsNotNull(pathResolver, nameof(pathResolver));

            SetManagementPermission(Permission.ManageAvatars);
        }
 public ReportService(ILogger <ReportService> logger,
                      GRA.Abstract.IDateTimeProvider dateTimeProvider,
                      IUserContextProvider userContextProvider,
                      IGraCache cache,
                      IJobRepository jobRepository,
                      IReportCriterionRepository reportCriterionRepository,
                      IReportRequestRepository reportRequestRepository,
                      IServiceProvider serviceProvider,
                      IUserLogRepository userLogRepository,
                      IUserRepository userRepository)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     _serviceProvider = serviceProvider
                        ?? throw new ArgumentNullException(nameof(serviceProvider));
     _cache         = cache ?? throw new ArgumentNullException(nameof(cache));
     _jobRepository = jobRepository
                      ?? throw new ArgumentNullException(nameof(jobRepository));
     _reportCriterionRepository = reportCriterionRepository
                                  ?? throw new ArgumentNullException(nameof(reportCriterionRepository));
     _reportRequestRepository = reportRequestRepository
                                ?? throw new ArgumentNullException(nameof(reportRequestRepository));
     _userRepository = userRepository
                       ?? throw new ArgumentNullException(nameof(userRepository));
     _userLogRepository = userLogRepository
                          ?? throw new ArgumentNullException(nameof(userLogRepository));
 }
Example #5
0
 public BadgeService(ILogger <BadgeService> logger,
                     GRA.Abstract.IDateTimeProvider dateTimeProvider,
                     IUserContextProvider userContextProvider,
                     IConfigurationRoot config,
                     IBadgeRepository badgeRepository,
                     IPathResolver pathResolver) : base(logger, dateTimeProvider, userContextProvider)
 {
     _config          = Require.IsNotNull(config, nameof(config));
     _badgeRepository = Require.IsNotNull(badgeRepository, nameof(badgeRepository));
     _pathResolver    = Require.IsNotNull(pathResolver, nameof(pathResolver));
 }
 public BadgeService(ILogger <BadgeService> logger,
                     GRA.Abstract.IDateTimeProvider dateTimeProvider,
                     IUserContextProvider userContextProvider,
                     IBadgeRepository badgeRepository,
                     IPathResolver pathResolver,
                     SiteLookupService siteLookupService) : base(logger, dateTimeProvider, userContextProvider)
 {
     _badgeRepository   = Require.IsNotNull(badgeRepository, nameof(badgeRepository));
     _pathResolver      = Require.IsNotNull(pathResolver, nameof(pathResolver));
     _siteLookupService = siteLookupService
                          ?? throw new ArgumentNullException(nameof(siteLookupService));
 }
Example #7
0
 public DailyLiteracyTipService(ILogger <DailyLiteracyTipService> logger,
                                GRA.Abstract.IDateTimeProvider dateTimeProvider,
                                IUserContextProvider userContextProvider,
                                IDailyLiteracyTipImageRepository dailyLiteracyTipImageRepository,
                                IDailyLiteracyTipRepository dailyLiteracyTipRepository,
                                IPathResolver pathResolver)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     SetManagementPermission(Permission.ManageDailyLiteracyTips);
     _dailyLiteracyTipImageRepository = dailyLiteracyTipImageRepository
                                        ?? throw new ArgumentNullException(nameof(dailyLiteracyTipImageRepository));
     _dailyLiteracyTipRepository = dailyLiteracyTipRepository
                                   ?? throw new ArgumentNullException(nameof(dailyLiteracyTipRepository));
     _pathResolver = pathResolver ?? throw new ArgumentNullException(nameof(pathResolver));
 }
Example #8
0
 public VendorCodeService(ILogger <VendorCodeService> logger,
                          GRA.Abstract.IDateTimeProvider dateTimeProvider,
                          IUserContextProvider userContextProvider,
                          IUserRepository userRepository,
                          ICodeGenerator codeGenerator,
                          IVendorCodeRepository vendorCodeRepository,
                          IVendorCodeTypeRepository vendorCodeTypeRepository,
                          MailService mailService)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     SetManagementPermission(Permission.ManageVendorCodes);
     _codeGenerator            = Require.IsNotNull(codeGenerator, nameof(codeGenerator));
     _userRepository           = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     _vendorCodeRepository     = Require.IsNotNull(vendorCodeRepository, nameof(vendorCodeRepository));
     _vendorCodeTypeRepository = Require.IsNotNull(vendorCodeTypeRepository, nameof(vendorCodeTypeRepository));
     _mailService = mailService ?? throw new ArgumentNullException(nameof(mailService));
 }
Example #9
0
        public ChallengeService(ILogger <ChallengeService> logger,
                                GRA.Abstract.IDateTimeProvider dateTimeProvider,
                                IGraCache cache,
                                IUserContextProvider userContextProvider,
                                IBadgeRepository badgeRepository,
                                IBranchRepository branchRepository,
                                ICategoryRepository categoryRepository,
                                IChallengeGroupRepository challengeGroupRepository,
                                IChallengeRepository challengeRepository,
                                IChallengeTaskRepository challengeTaskRepository,
                                IEventRepository eventRepository,
                                IFeaturedChallengeGroupRepository featuredChallengeGroupRepository,
                                IPathResolver pathResolver,
                                ITriggerRepository triggerRepository,
                                LanguageService languageService,
                                SiteLookupService siteLookupService
                                )
            : base(logger, dateTimeProvider, userContextProvider)
        {
            _badgeRepository = badgeRepository
                               ?? throw new ArgumentNullException(nameof(badgeRepository));
            _branchRepository = branchRepository
                                ?? throw new ArgumentNullException(nameof(branchRepository));
            _cache = cache ?? throw new ArgumentNullException(nameof(cache));
            _categoryRepository = categoryRepository
                                  ?? throw new ArgumentNullException(nameof(categoryRepository));
            _challengeRepository = challengeRepository
                                   ?? throw new ArgumentNullException(nameof(challengeRepository));
            _challengeGroupRepository = challengeGroupRepository
                                        ?? throw new ArgumentNullException(nameof(challengeGroupRepository));
            _challengeTaskRepository = challengeTaskRepository
                                       ?? throw new ArgumentNullException(nameof(challengeTaskRepository));
            _eventRepository = eventRepository
                               ?? throw new ArgumentNullException(nameof(eventRepository));
            _featuredChallengeGroupRepository = featuredChallengeGroupRepository
                                                ?? throw new ArgumentNullException(nameof(featuredChallengeGroupRepository));
            _pathResolver = pathResolver ?? throw new ArgumentNullException(nameof(pathResolver));

            _triggerRepository = triggerRepository
                                 ?? throw new ArgumentNullException(nameof(triggerRepository));
            _languageService = languageService
                               ?? throw new ArgumentNullException(nameof(languageService));
            _siteLookupService = siteLookupService
                                 ?? throw new ArgumentNullException(nameof(siteLookupService));
        }
 public TemplateService(ILogger <TemplateService> logger,
                        GRA.Abstract.IDateTimeProvider dateTimeProvider,
                        IConfiguration config) : base(logger, dateTimeProvider)
 {
     _config = config ?? throw new ArgumentNullException(nameof(config));
 }