Ejemplo n.º 1
0
 public CatalogItemsFlow(IContextProvider contextProvider,
     IStateProvider stateProvider)
 {
     _userContextProvider = new UserContextProvider(stateProvider, contextProvider);
     _userCatalogProvider = new UserCatalogProvider(contextProvider, stateProvider);
     _catalogItemsApi = new CatalogItemsApi(contextProvider);
 }
Ejemplo n.º 2
0
 public CreateCatalogFlow(IContextProvider contextProvider,
     IStateProvider stateProvider)
 {
     _catalogsApi = new CatalogsApi(contextProvider);
     _userContextProvider = new UserContextProvider(stateProvider, contextProvider);
     _catalogsRepository = new CatalogsRepository();
 }
Ejemplo n.º 3
0
 public DashboardFlow(IContextProvider contextProvider,
     IStateProvider stateProvider)
 {
     _userContextProvider = new UserContextProvider(stateProvider, contextProvider);
     _productsApi = new ProductsApi(contextProvider);
     _productsRepository = new ProductsRepository();
     _userCatalogProvider = new UserCatalogProvider(contextProvider, stateProvider);
 }
Ejemplo n.º 4
0
 public GetOrderCommand(IExtendedTelegramBotClient telegramBotClient,
                        IUserContextProvider userContextProvider,
                        ITelegramHookrRepository hookrRepository,
                        ITranslationsResolver translationsResolver)
     : base(telegramBotClient,
            userContextProvider,
            hookrRepository,
            translationsResolver)
 {
 }
 public CategoryService(ILogger <CategoryService> logger,
                        GRA.Abstract.IDateTimeProvider dateTimeProvider,
                        IUserContextProvider userContextProvider,
                        ICategoryRepository categoryRepository)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     SetManagementPermission(Permission.ManageCategories);
     _categoryRepository = Require.IsNotNull(categoryRepository,
                                             nameof(categoryRepository));
 }
Ejemplo n.º 6
0
 public CategoryService(ILogger <CategoryService> logger,
                        GRA.Abstract.IDateTimeProvider dateTimeProvider,
                        IUserContextProvider userContextProvider,
                        ICategoryRepository categoryRepository)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     SetManagementPermission(Permission.ManageCategories);
     _categoryRepository = categoryRepository
                           ?? throw new ArgumentNullException(nameof(categoryRepository));
 }
 protected GetSingleCommandBase(IExtendedTelegramBotClient telegramBotClient,
                                IUserContextProvider userContextProvider,
                                ITelegramHookrRepository hookrRepository,
                                ITranslationsResolver translationsResolver)
     : base(telegramBotClient,
            translationsResolver)
 {
     UserContextProvider  = userContextProvider;
     this.hookrRepository = hookrRepository;
 }
Ejemplo n.º 8
0
 public MailService(ILogger <MailService> logger,
                    IUserContextProvider userContextProvider,
                    IMailRepository mailRepository,
                    IUserRepository userRepository,
                    IMemoryCache memoryCache) : base(logger, userContextProvider)
 {
     _mailRepository = Require.IsNotNull(mailRepository, nameof(mailRepository));
     _userRepository = Require.IsNotNull(userRepository, nameof(userRepository));
     _memoryCache    = Require.IsNotNull(memoryCache, nameof(memoryCache));
 }
Ejemplo n.º 9
0
 public Manager(IServiceProvider service)
 {
     // we pull the repos from container to avoid to many ctor params (see startup.cs for definitions)
     this.RepRoles      = service.GetService <IAuthenticationRepository <IdentityRole, string> >();
     this.RepUsers      = service.GetService <IAuthenticationRepository <IdentityUser, string> >();
     this.RepUserClaims = service.GetService <IAuthenticationRepository <IdentityUserClaim <string>, string> >();
     this.RepUserRoles  = service.GetService <IAuthenticationRepository <IdentityUserRole <string>, string> >();
     // user management
     this.userContext = service.GetService <IUserContextProvider>();
 }
Ejemplo n.º 10
0
 public BasicAuthenticationHandler(
     IOptionsMonitor <BasicAuthenticationOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     IUserContextProvider userContext)
     : base(options, logger, encoder, clock)
 {
     this.userContext = userContext;
 }
 public AuthorizationCodeService(ILogger <AuthorizationCodeService> logger,
                                 GRA.Abstract.IDateTimeProvider dateTimeProvider,
                                 IUserContextProvider userContextProvider,
                                 IAuthorizationCodeRepository authorizationCodeRepository)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     SetManagementPermission(Model.Permission.ManageRoles);
     _authorizationCodeRepository = authorizationCodeRepository
                                    ?? throw new ArgumentNullException(nameof(authorizationCodeRepository));
 }
 public DeleteTobaccoPhotosCommand(IExtendedTelegramBotClient telegramBotClient,
                                   ITranslationsResolver translationsResolver,
                                   IUserContextProvider userContextProvider,
                                   ITelegramHookrRepository hookrRepository)
     : base(telegramBotClient,
            translationsResolver,
            userContextProvider,
            hookrRepository)
 {
 }
 public DashboardContentService(ILogger <DashboardContentService> logger,
                                IDateTimeProvider dateTimeProvider,
                                IUserContextProvider userContextProvider,
                                IDashboardContentRepository dashboardContentRepository)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     SetManagementPermission(Permission.ManageDashboardContent);
     _dashboardContentRepository = dashboardContentRepository
                                   ?? throw new ArgumentNullException(nameof(dashboardContentRepository));
 }
Ejemplo n.º 14
0
 public PublicCollectionsController(
     ApplicationDbContext dbContext,
     IRequestInfoService requestInfoService,
     IUserContextProvider userContextProvider,
     IMemoryCache cache)
 {
     _dbContext           = dbContext;
     _requestInfoService  = requestInfoService;
     _userContextProvider = userContextProvider;
     _cache = cache;
 }
Ejemplo n.º 15
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));
 }
Ejemplo n.º 16
0
 public DrawingService(ILogger <DrawingService> logger,
                       IUserContextProvider userContextProvider,
                       IDrawingRepository drawingRepository,
                       IDrawingCriterionRepository drawingCriterionRepository,
                       IMailRepository mailRepository) : base(logger, userContextProvider)
 {
     _drawingRepository          = Require.IsNotNull(drawingRepository, nameof(drawingRepository));
     _drawingCriterionRepository = Require.IsNotNull(drawingCriterionRepository,
                                                     nameof(drawingCriterionRepository));
     _mailRepository = Require.IsNotNull(mailRepository, nameof(mailRepository));
 }
Ejemplo n.º 17
0
 public PostsController(IPostsRepository postsRepository,
                        IPostService postService,
                        IUnitOfWork unitOfWork,
                        IUserContextProvider userContextProvider) :
     base(postsRepository, postService, unitOfWork, userContextProvider)
 {
     PostsRepository     = postsRepository;
     PostService         = postService;
     UnitOfWork          = unitOfWork;
     UserContextProvider = userContextProvider;
 }
Ejemplo n.º 18
0
 public UserFilter(ILogger <UserFilter> logger,
                   MailService mailService,
                   UserService userService,
                   IUserContextProvider userContextProvider)
 {
     _logger              = logger ?? throw new ArgumentNullException(nameof(logger));
     _mailService         = mailService ?? throw new ArgumentNullException(nameof(mailService));
     _userService         = userService ?? throw new ArgumentNullException(nameof(userService));
     _userContextProvider = userContextProvider
                            ?? throw new ArgumentNullException(nameof(userContextProvider));
 }
Ejemplo n.º 19
0
 public VendorCodeService(ILogger <VendorCodeService> logger,
                          IUserContextProvider userContextProvider,
                          ICodeGenerator codeGenerator,
                          IVendorCodeRepository vendorCodeRepository,
                          IVendorCodeTypeRepository vendorCodeTypeRepository) : base(logger, userContextProvider)
 {
     SetManagementPermission(Permission.ManageVendorCodes);
     _codeGenerator            = Require.IsNotNull(codeGenerator, nameof(codeGenerator));
     _vendorCodeRepository     = Require.IsNotNull(vendorCodeRepository, nameof(vendorCodeRepository));
     _vendorCodeTypeRepository = Require.IsNotNull(vendorCodeTypeRepository, nameof(vendorCodeTypeRepository));
 }
Ejemplo n.º 20
0
 public SchoolService(ILogger <SchoolService> logger,
                      GRA.Abstract.IDateTimeProvider dateTimeProvider,
                      IUserContextProvider userContextProvider,
                      ISchoolDistrictRepository schoolDistrictRepository,
                      ISchoolRepository schoolRepository) : base(logger, dateTimeProvider, userContextProvider)
 {
     _schoolDistrictRepository = schoolDistrictRepository
                                 ?? throw new ArgumentNullException(nameof(schoolDistrictRepository));
     _schoolRepository = schoolRepository
                         ?? throw new ArgumentNullException(nameof(schoolRepository));
 }
 public UsersController(
     IUserContextProvider userContextProvider,
     ApplicationDbContext dbContext,
     UserManager <ApplicationUser> userManager,
     RoleManager <IdentityRole> roleManager)
 {
     _userContextProvider = userContextProvider;
     _dbContext           = dbContext;
     _userManager         = userManager;
     _roleManager         = roleManager;
 }
Ejemplo n.º 22
0
 public AuthenticationController(UserManager <User> userManager, SignInManager <User> signInManager, RoleManager <Role> roleManager,
                                 IMapper mapper, IConfiguration configuration, IDateTimeProvider dateTimeProvider, IUserContextProvider userContextProvider)
 {
     _userManager         = userManager;
     _signInManager       = signInManager;
     _roleManager         = roleManager;
     _mapper              = mapper;
     _configuration       = configuration;
     _dateTimeProvider    = dateTimeProvider;
     _userContextProvider = userContextProvider;
 }
Ejemplo n.º 23
0
 public UserService(ILogger <UserService> logger,
                    IUserContextProvider userContextProvider,
                    GRA.Abstract.IPasswordValidator passwordValidator,
                    IAuthorizationCodeRepository authorizationCodeRepository,
                    IBadgeRepository badgeRepository,
                    IBookRepository bookRepository,
                    IBranchRepository branchRepository,
                    IMailRepository mailRepository,
                    INotificationRepository notificationRepository,
                    IPrizeWinnerRepository prizeWinnerRepository,
                    IProgramRepository programRepository,
                    IRequiredQuestionnaireRepository requireQuestionnaireRepository,
                    IRoleRepository roleRepository,
                    ISchoolRepository schoolRepository,
                    ISiteRepository siteRepository,
                    IStaticAvatarRepository staticAvatarRepository,
                    ISystemRepository systemRepository,
                    IUserLogRepository userLogRepository,
                    IUserRepository userRepository,
                    IVendorCodeRepository vendorCodeRepository,
                    ActivityService activityService,
                    SampleDataService configurationService,
                    SchoolService schoolService)
     : base(logger, userContextProvider)
 {
     _passwordValidator           = Require.IsNotNull(passwordValidator, nameof(passwordValidator));
     _authorizationCodeRepository = Require.IsNotNull(authorizationCodeRepository,
                                                      nameof(authorizationCodeRepository));
     _badgeRepository        = Require.IsNotNull(badgeRepository, nameof(badgeRepository));
     _bookRepository         = Require.IsNotNull(bookRepository, nameof(bookRepository));
     _branchRepository       = Require.IsNotNull(branchRepository, nameof(branchRepository));
     _mailRepository         = Require.IsNotNull(mailRepository, nameof(mailRepository));
     _notificationRepository = Require.IsNotNull(notificationRepository,
                                                 nameof(notificationRepository));
     _prizeWinnerRepository = Require.IsNotNull(prizeWinnerRepository,
                                                nameof(prizeWinnerRepository));
     _programRepository = Require.IsNotNull(programRepository, nameof(programRepository));
     _requireQuestionnaireRepository = Require.IsNotNull(requireQuestionnaireRepository,
                                                         nameof(requireQuestionnaireRepository));
     _roleRepository         = Require.IsNotNull(roleRepository, nameof(roleRepository));
     _schoolRepository       = Require.IsNotNull(schoolRepository, nameof(schoolRepository));
     _siteRepository         = Require.IsNotNull(siteRepository, nameof(siteRepository));
     _staticAvatarRepository = Require.IsNotNull(staticAvatarRepository,
                                                 nameof(staticAvatarRepository));
     _systemRepository     = Require.IsNotNull(systemRepository, nameof(systemRepository));
     _userLogRepository    = Require.IsNotNull(userLogRepository, nameof(userLogRepository));
     _userRepository       = Require.IsNotNull(userRepository, nameof(userRepository));
     _vendorCodeRepository = Require.IsNotNull(vendorCodeRepository, nameof(vendorCodeRepository));
     _activityService      = Require.IsNotNull(activityService, nameof(activityService));
     _configurationService = Require.IsNotNull(configurationService,
                                               nameof(configurationService));
     _schoolService = Require.IsNotNull(schoolService, nameof(schoolService));
 }
Ejemplo n.º 24
0
 public UsersControllerBase(IUsersRepository usersRepository,
                            IUserService userService,
                            ILogger <UsersControllerBase> logger,
                            IUnitOfWork unitOfWork,
                            IUserContextProvider userContextProvider)
 {
     UsersRepository     = usersRepository;
     UserService         = userService;
     Logger              = logger;
     UnitOfWork          = unitOfWork;
     UserContextProvider = userContextProvider;
 }
 public JobService(ILogger <JobService> logger,
                   IDateTimeProvider dateTimeProvider,
                   IUserContextProvider userContextProvider,
                   IJobRepository jobRepository,
                   IHttpContextAccessor httpContextAccessor)
     : base(logger, dateTimeProvider, userContextProvider)
 {
     _jobRepository = jobRepository
                      ?? throw new ArgumentNullException(nameof(jobRepository));
     _httpContextAccessor = httpContextAccessor
                            ?? throw new ArgumentNullException(nameof(httpContextAccessor));
 }
 protected ReviewConfirmedOrderCommandBase(IExtendedTelegramBotClient telegramBotClient,
                                           IUserContextProvider userContextProvider,
                                           ITelegramHookrRepository hookrRepository,
                                           ITranslationsResolver translationsResolver,
                                           ITelegramUsersNotifier telegramUsersNotifier)
     : base(telegramBotClient,
            userContextProvider,
            hookrRepository,
            translationsResolver,
            telegramUsersNotifier)
 {
 }
 public ConfirmOrderCommand(IExtendedTelegramBotClient telegramBotClient,
                            IUserContextProvider userContextProvider,
                            ITelegramHookrRepository hookrRepository,
                            ITelegramUsersNotifier telegramUsersNotifier,
                            ITranslationsResolver translationsResolver)
     : base(telegramBotClient,
            userContextProvider,
            hookrRepository,
            translationsResolver)
 {
     this.telegramUsersNotifier = telegramUsersNotifier;
 }
Ejemplo n.º 28
0
 protected SetPhotoCommandBase(IExtendedTelegramBotClient telegramBotClient,
                               ITelegramHookrRepository hookrRepository,
                               ITranslationsResolver translationsResolver,
                               IUserContextProvider userContextProvider,
                               IMemoryCache memoryCache)
     : base(telegramBotClient,
            translationsResolver)
 {
     this.userContextProvider = userContextProvider;
     this.hookrRepository     = hookrRepository;
     this.memoryCache         = memoryCache;
 }
Ejemplo n.º 29
0
 protected AskForPhotoCommandBase(IExtendedTelegramBotClient telegramBotClient,
                                  ITranslationsResolver translationsResolver,
                                  ICacheProvider cacheProvider,
                                  IUserContextProvider userContextProvider,
                                  IMemoryCache memoryCache)
     : base(telegramBotClient,
            translationsResolver)
 {
     this.cacheProvider       = cacheProvider;
     this.userContextProvider = userContextProvider;
     this.memoryCache         = memoryCache;
 }
 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));
 }
Ejemplo n.º 31
0
 public UnregisterCommand(IExtendedTelegramBotClient telegramBotClient,
                          ITelegramHookrRepository hookrRepository,
                          IUserContextProvider userContextProvider,
                          IApplicationConfig applicationConfig,
                          ITranslationsResolver translationsResolver)
     : base(telegramBotClient,
            hookrRepository,
            userContextProvider,
            applicationConfig,
            translationsResolver)
 {
 }
Ejemplo n.º 32
0
 protected RegisterCommandBase(IExtendedTelegramBotClient telegramBotClient,
                               ITelegramHookrRepository hookrRepository,
                               IUserContextProvider userContextProvider,
                               IApplicationConfig applicationConfig,
                               ITranslationsResolver translationsResolver) :
     base(telegramBotClient,
          translationsResolver)
 {
     this.hookrRepository     = hookrRepository;
     this.userContextProvider = userContextProvider;
     this.applicationConfig   = applicationConfig;
 }
Ejemplo n.º 33
0
 public SocialTagHelper(
     IOptions <RequestLocalizationOptions> localizationOptions,
     SiteLookupService siteLookupService,
     IUserContextProvider userContextProvider)
 {
     _localizationOptions = localizationOptions
                            ?? throw new ArgumentNullException(nameof(localizationOptions));
     _siteLookupService = siteLookupService
                          ?? throw new ArgumentNullException(nameof(siteLookupService));
     _userContextProvider = userContextProvider
                            ?? throw new ArgumentNullException(nameof(userContextProvider));
 }