public FileFacade(IUnitOfWorkProvider unitOfWorkProvider, ICurrentUserProvider currentUserProvider, FileRepository fileRepository, IFileStorage fileStorage) : base(unitOfWorkProvider, currentUserProvider) { _fileRepository = fileRepository; _fileStorage = fileStorage; }
/// <summary> /// Initializes <see cref="UserProfileController"/> /// </summary> /// <param name="fairplaytubeDatabaseContext"></param> /// <param name="currentUserProvider"></param> /// <param name="paymentService"></param> public UserProfileController(FairplaytubeDatabaseContext fairplaytubeDatabaseContext, ICurrentUserProvider currentUserProvider, PaymentService paymentService) { this.FairplaytubeDatabaseContext = fairplaytubeDatabaseContext; this.CurrentUserProvider = currentUserProvider; this.PaymentService = paymentService; }
public UserProfileController(IUserProfileOperations userProfileOper, IUrlProvider urlProvider, ICurrentUserProvider currentUserProvider) : base(currentUserProvider) { _urlProvider = urlProvider; _profileOperations = userProfileOper; }
public ShoppingListsController(IShoppingLists lists, ICurrentUserProvider users, ILogger <ShoppingListsController> logger) { _lists = lists; _users = users; _logger = logger; }
public Handler(IDataContext dataContext, IMapper mapper, ICurrentUserProvider currentUserProvider, IEncryptionService enctryptionService) : base(dataContext, mapper, currentUserProvider) { this._enryptionService = enctryptionService ?? throw new ArgumentNullException(nameof(enctryptionService)); }
public BasicTransactionService(IRepository repository, IRelationRepository relationRepository, IEntityFactory entityFactory, ICurrentUserProvider currentUserProvider) { _repository = repository; _relationRepository = relationRepository; _entityFactory = entityFactory; _currentUserProvider = currentUserProvider; }
public GetErrandQueryHandler( ICurrentDateService currentDateService, ICurrentUserProvider currentUserProvider, IDeratControlDbContext db) : base(currentDateService, currentUserProvider) { this.db = db; }
public DocumentService( IDataContext dataContext, ICurrentUserProvider currentUserProvider) { this.dataContext = dataContext; this.currentUserProvider = currentUserProvider; }
// Constructors public CasesRepository(ICurrentUserProvider currentUserProvider, IDBContextProvider dBContextProvider, ISettingsProvider settingsRepository) { _currentUser = currentUserProvider; _context = dBContextProvider.CoreContext; _settings = settingsRepository; hoursEntryMappings = new HoursEntryMappings(_currentUser.Provider, _context); }
public OrganizacaoNegocio(IOrganogramaRepositorios repositorios, ICurrentUserProvider currentUser, IClientAccessToken clientAccessToken) { this.repositorios = repositorios; unitOfWork = repositorios.UnitOfWork; repositorioOrganizacoes = repositorios.Organizacoes; repositorioContatos = repositorios.Contatos; repositorioContatosOrganizacoes = repositorios.ContatosOrganizacoes; repositorioEmails = repositorios.Emails; repositorioEmailsOrganizacoes = repositorios.EmailsOrganizacoes; repositorioEnderecos = repositorios.Enderecos; repositorioHistoricos = repositorios.Historicos; repositorioIdentificadoresExternos = repositorios.IdentificadoresExternos; repositorioMunicipios = repositorios.Municipios; repositorioSites = repositorios.Sites; repositorioSitesOrganizacoes = repositorios.SitesOrganizacoes; repositorioUnidades = repositorios.Unidades; validacao = new OrganizacaoValidacao(repositorioOrganizacoes); cnpjValidacao = new CnpjValidacao(repositorioOrganizacoes); contatoValidacao = new ContatoValidacao(repositorios.Contatos, repositorios.TiposContatos); emailValidacao = new EmailValidacao(); enderecoValidacao = new EnderecoValidacao(repositorios.Enderecos, repositorios.Municipios); esferaValidacao = new EsferaOrganizacaoValidacao(repositorios.EsferasOrganizacoes); poderValidacao = new PoderValidacao(repositorios.Poderes); siteValidacao = new SiteValidacao(); tipoOrganizacaoValidacao = new TipoOrganizacaoValidacao(repositorios.TiposOrganizacoes); _currentUser = currentUser; _clientAccessToken = clientAccessToken; }
public BasicIncomeService(IRepository repository, IEntityFactory entityFactory, ICurrentUserProvider currentUserProvider, IRelationRepository relationRepository) { _repository = repository; _entityFactory = entityFactory; _currentUserProvider = currentUserProvider; _relationRepository = relationRepository; }
public UserAuthorisationRestriction( ICurrentUserProvider currentUserProvider, IQueryRepository <User> userQueryRepository) { _currentUserProvider = currentUserProvider; _userQueryRepository = userQueryRepository; }
public StatsFacade(IUnitOfWorkProvider unitOfWorkProvider, ICurrentUserProvider currentUserProvider, ICurrentTimeProvider currentTimeProvider, IBrokerStatus brokerStatus) : base(unitOfWorkProvider, currentUserProvider) { _currentTimeProvider = currentTimeProvider; _brokerStatus = brokerStatus; }
public void Setup() { _plantCacheMock.Setup(p => p.GetPlantTitleAsync(_plantA.Id)).Returns(Task.FromResult(_plantA.Title)); _plantCacheMock.Setup(p => p.GetPlantTitleAsync(_plantB.Id)).Returns(Task.FromResult(_plantB.Title)); var currentUserProviderMock = new Mock <ICurrentUserProvider>(); currentUserProviderMock.Setup(x => x.GetCurrentUserOid()).Returns(_currentUserOid); _currentUserProvider = currentUserProviderMock.Object; var eventDispatcher = new Mock <IEventDispatcher>(); _eventDispatcher = eventDispatcher.Object; _timeProvider = new ManualTimeProvider(new DateTime(2020, 2, 1, 0, 0, 0, DateTimeKind.Utc)); TimeService.SetProvider(_timeProvider); _dbContextOptions = new DbContextOptionsBuilder <PreservationContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; using (var context = new PreservationContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider)) { // ensure current user exists in db _currentUser = new Person(_currentUserOid, "Ole", "Lukkøye"); context.Persons.Add(_currentUser); context.SaveChangesAsync().Wait(); _plantProvider.SetPlant(_plantA.Id); (_projectA, _actionA) = CreateAction(context, "PrA", false); _plantProvider.SetPlant(_plantB.Id); (_projectB, _actionB) = CreateAction(context, "PrB", true); _plantProvider.SetCrossPlantQuery(); } }
public DefaultCurrentCompanyProvider(IHttpContextAccessor httpContextAccessor, IDbContextFactory dbContextFactory, ICurrentUserProvider currentUserProvider) { _httpContextAccessor = httpContextAccessor; _dbContextFactory = dbContextFactory; _currentUserProvider = currentUserProvider; }
public CreateInvitationCommandHandler( IPlantProvider plantProvider, IFusionMeetingClient meetingClient, IInvitationRepository invitationRepository, IUnitOfWork unitOfWork, ICommPkgApiService commPkgApiService, IMcPkgApiService mcPkgApiService, IPersonApiService personApiService, IFunctionalRoleApiService functionalRoleApiService, IOptionsMonitor <MeetingOptions> meetingOptions, IPersonRepository personRepository, ICurrentUserProvider currentUserProvider, ILogger <CreateInvitationCommandHandler> logger) { _plantProvider = plantProvider; _meetingClient = meetingClient; _invitationRepository = invitationRepository; _unitOfWork = unitOfWork; _commPkgApiService = commPkgApiService; _mcPkgApiService = mcPkgApiService; _personApiService = personApiService; _functionalRoleApiService = functionalRoleApiService; _meetingOptions = meetingOptions; _personRepository = personRepository; _currentUserProvider = currentUserProvider; _logger = logger; }
private static void SeedCurrentUserAsPerson(IPOContext dbContext, ICurrentUserProvider userProvider) { var personRepository = new PersonRepository(dbContext); personRepository.Add(new Person(userProvider.GetCurrentUserOid(), "Siri", "Seed", "ss", "*****@*****.**")); dbContext.SaveChangesAsync().Wait(); }
public CopyCourseRunController( ILogger <CopyCourseRunController> logger, ICourseService courseService, ISqlQueryDispatcher sqlQueryDispatcher, IProviderContextProvider providerContextProvider, ICurrentUserProvider currentUserProvider, IClock clock, IRegionCache regionCache) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (courseService == null) { throw new ArgumentNullException(nameof(courseService)); } _logger = logger; _courseService = courseService; _sqlQueryDispatcher = sqlQueryDispatcher; _providerContextProvider = providerContextProvider; _currentUserProvider = currentUserProvider; _clock = clock; _regionCache = regionCache; }
public CommandHandler( ISqlQueryDispatcher sqlQueryDispatcher, ICurrentUserProvider currentUserProvider) { _sqlQueryDispatcher = sqlQueryDispatcher; _currentUserProvider = currentUserProvider; }
public AccountsController(ICommandDispatcher commandDispatcher, IQueryDispatcher queryDispatcher, IIdentityModelClient identityClient, ICurrentUserProvider userProvider) { _commandDispatcher = commandDispatcher; _queryDispatcher = queryDispatcher; _identityClient = identityClient; _userProvider = userProvider; }
public AlgorithmFacade(IUnitOfWorkProvider unitOfWorkProvider, ICurrentUserProvider currentUserProvider, AlgorithmRepository algorithmRepository, ICurrentTimeProvider currentTimeProvider) : base(unitOfWorkProvider, currentUserProvider) { _algorithmRepository = algorithmRepository; _currentTimeProvider = currentTimeProvider; }
public GetEmployeeErrandListQueryHandler( IDeratControlDbContext db, ICurrentDateService currentDateService, ICurrentUserProvider currentUserProvider) : base(currentDateService, currentUserProvider) { this.db = db; }
private FairplaytubeDatabaseContext ConfigureFairPlayTubeDataContext(ICurrentUserProvider currentUserProvider) { DbContextOptionsBuilder <FairplaytubeDatabaseContext> dbContextOptionsBuilder = new(); bool useInMemoryDatabase = Convert.ToBoolean(Configuration["UseInMemoryDatabase"]); if (useInMemoryDatabase) { dbContextOptionsBuilder = dbContextOptionsBuilder.UseInMemoryDatabase("FairPlayTubeInMemoryDb"); } else { dbContextOptionsBuilder = dbContextOptionsBuilder.UseSqlServer(Configuration.GetConnectionString("Default"), sqlServerOptionsAction: (serverOptions) => serverOptions .EnableRetryOnFailure(3, TimeSpan.FromSeconds(5), null)); } FairplaytubeDatabaseContext fairplaytubeDatabaseContext = new(dbContextOptionsBuilder.Options, currentUserProvider); if (useInMemoryDatabase) { ConfigureInMemoryDatabase(fairplaytubeDatabaseContext); } return(fairplaytubeDatabaseContext); }
public CheckCase(IAppDbContext context, ILogger <SignInCase> logger, IAuthDataProvider dataProvider, ICurrentUserProvider currentUserProvider) { _context = context; _logger = logger; _dataProvider = dataProvider; _currentUserProvider = currentUserProvider; }
public InvitationController(ISender mediator, ICurrentCompanyProvider currentCompanyProvider, ICurrentUserProvider currentUserProvider) { _mediator = mediator; _currentCompanyProvider = currentCompanyProvider; _currentUserProvider = currentUserProvider; }
public void SetupBase() { _plantProviderMock = new Mock <IPlantProvider>(); _plantProviderMock.SetupGet(x => x.Plant).Returns(TestPlant); _plantProvider = _plantProviderMock.Object; var currentUserProviderMock = new Mock <ICurrentUserProvider>(); currentUserProviderMock.Setup(x => x.GetCurrentUserOid()).Returns(_currentUserOid); _currentUserProvider = currentUserProviderMock.Object; var eventDispatcher = new Mock <IEventDispatcher>(); _eventDispatcher = eventDispatcher.Object; _timeProvider = new ManualTimeProvider(new DateTime(2020, 2, 1, 0, 0, 0, DateTimeKind.Utc)); TimeService.SetProvider(_timeProvider); _dbContextOptions = new DbContextOptionsBuilder <POContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; // ensure current user exists in db using (var context = new POContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider)) { if (context.Persons.SingleOrDefault(p => p.Oid == _currentUserOid) == null) { AddPerson(context, _currentUserOid, "Ole", "Lukkøye"); } } SetupNewDatabase(_dbContextOptions); }
public GetSavedFiltersInProjectQueryHandler( IReadOnlyContext context, ICurrentUserProvider currentUserProvider) { _context = context; _currentUserProvider = currentUserProvider; }
public SavedFilterValidator( IReadOnlyContext context, ICurrentUserProvider currentUserProvider) { _context = context; _currentUserProvider = currentUserProvider; }
public CacheController(IPlantCache plantCache, IPermissionCache permissionCache, ICurrentUserProvider currentUserProvider, IPermissionApiService permissionApiService) { _plantCache = plantCache; _permissionCache = permissionCache; _currentUserProvider = currentUserProvider; _permissionApiService = permissionApiService; }
public EventMetadataController(ISender mediator, ICurrentCompanyProvider currentCompanyProvider, ICurrentUserProvider currentUserProvider) { _mediator = mediator; _currentCompanyProvider = currentCompanyProvider; _currentUserProvider = currentUserProvider; }
public static IAppBuilder UseJwtTokenAuthentication(this IAppBuilder app, string issuer, string audience, string clientSecret, ICurrentUserProvider currentUserProvider) { return app.UseJwtTokenAuthentication(new JwtTokenAuthenticationOptions(issuer, audience, clientSecret), currentUserProvider); }
public NewService(IGuidKeyedRepository<New> newRepository, ICurrentUserProvider currentUserProvider, ICurrentUserNameProvider currentUserNameProvider, IGuidKeyedRepository<User> userRepository) { this.newRepository = newRepository; this.currentUserNameProvider = currentUserNameProvider; this.userRepository = userRepository; }
public ChatHub(IAddMessage addMessage, IUnitOfWork unitOfWork, IGetMessagesForRoom getMessagesForRoom, ICurrentUserProvider currentUserProvider) { _addMessage = addMessage; _unitOfWork = unitOfWork; _getMessagesForRoom = getMessagesForRoom; _currentUserProvider = currentUserProvider; }
public ApprovalsController( IApprovalsViewRepository repository, ICurrentUserProvider userProvider, ICommandHandler<ApprovePromotionDraftCommand> approveHandler, ICommandHandler<RejectPromotionDraftCommand> rejectHandler) { _repository = repository; _userProvider = userProvider; _approveHandler = approveHandler; _rejectHandler = rejectHandler; }
public static IAppBuilder UseJwtTokenAuthentication(this IAppBuilder app, JwtTokenAuthenticationOptions options, ICurrentUserProvider currentUserProvider) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } app.Use(typeof (JwtTokenAuthenticationMiddleware), app, options, currentUserProvider); app.UseStageMarker(PipelineStage.Authenticate); return app; }
public PromotionController( IPromotionsViewRepository repository, ICurrentUserProvider userProvider, ICommandHandler<CreatePromotionCommand> createPromotionHandler, ICommandHandler<RenamePromotionCommand> renamePromotionHandler, ICommandHandler<SetValidityDatesCommand> changeDatesHandler, ICommandHandler<SetBenefitCommand> changeBenefitHandler, ICommandHandler<SetConditionCommand> changeConditionHandler, ICommandHandler<MarkPromotionAsReadyCommand> markAsReadyHandler) { _repository = repository; _userProvider = userProvider; _createPromotionHandler = createPromotionHandler; _renamePromotionHandler = renamePromotionHandler; _changeDatesHandler = changeDatesHandler; _changeBenefitHandler = changeBenefitHandler; _changeConditionHandler = changeConditionHandler; _markAsReadyHandler = markAsReadyHandler; }
public AuditController(IAuditViewRepository auditRepository, ICurrentUserProvider currentUserProvider) { _auditRepository = auditRepository; _currentUserProvider = currentUserProvider; }
public EfApprovalsViewRepository(DDDCinemaReadonly context, ICurrentUserProvider provider) { _context = context; _provider = provider; }
public NewController(INewService newService, ICurrentUserProvider currentUserProvider) { this.newService = newService; this.currentUserProvider = currentUserProvider; }
public HomeController(ICurrentUserProvider currentUserProvider) { _currentUserProvider = currentUserProvider; }
public CurrentUserModule(ICurrentUserProvider currentUserProvider) { this.RequiresMSOwinAuthentication(); Get["/currentUser"] = _ => new JsonObjectResponse(currentUserProvider.CurrentUser); }
public ReservationController(ICurrentUserProvider userProvider, ICommandHandler<ReserveSeatCommand> service) { _movieService = service; _userProvider = userProvider; }
public NotificationController(INotificationViewRepository notificationRepository, ICurrentUserProvider userProvider) { _notificationRepository = notificationRepository; _userProvider = userProvider; }
public AuditLogger(ICurrentUserProvider userProvider, CinemaContext context) { _userProvider = userProvider; _context = context; }