Beispiel #1
0
 public DonateHandler(ICampaignRepository campaignRepository, IFundraiserRepository fundraiserRepository, IDonationRepository donationRepository, IEventBus eventBus)
 {
     _campaignRepository   = campaignRepository;
     _fundraiserRepository = fundraiserRepository;
     _donationRepository   = donationRepository;
     _eventBus             = eventBus;
 }
Beispiel #2
0
 public DonationController(IDonationRepository donationRepository, IMemberRepository memberRepository, IMapper mapper)
 {
     _donationRepository = donationRepository;
     _memberRepository   = memberRepository;
     _mapper             = mapper;
     DonationVM          = new DonationViewModel();
 }
 public DonationsController(IDonationRepository repository, ILogger log, ISession session)
     : base(repository, log)
 {
     this.repository = repository;
     this.log        = log;
     this.session    = session;
 }
Beispiel #4
0
 public MockDataController(IDonationRepository donationRepository)
 {
     if (donationRepository == null)
     {
         throw new ArgumentNullException(nameof(donationRepository));
     }
     _donationRepository = donationRepository;
 }
Beispiel #5
0
 public DonationService(IDonationRepository donationRepository, ICategoryRepository categoryRepository, 
     ICategoryDonationRelationsRepository relationRepository, IValidator<FullDonation> fullDonationValidator)
 {
     _donationRepository = donationRepository;
     _categoryRepository = categoryRepository;
     _relationRepository = relationRepository;
     _fullDonationValidator = fullDonationValidator;
 }
Beispiel #6
0
 public DonationsViewComponent(IDonationRepository repo, ITargetAmountRepository goalRepo, ITargetTypeRepository goalTypeRepo,
                               IIncomeEntryRespository incomeRepo)
 {
     _repo         = repo;
     _goalRepo     = goalRepo;
     _goalTypeRepo = goalTypeRepo;
     _incomeRepo   = incomeRepo;
 }
Beispiel #7
0
        public BatchService(IDonationRepository donationRepository, IBatchRepository batchRepository, IMapper mapper, IConfigurationWrapper configurationWrapper)
        {
            _donationRepository = donationRepository;
            _batchRepository    = batchRepository;
            _mapper             = mapper;

            _batchEntryTypeValue = configurationWrapper.GetMpConfigIntValue("CRDS-FINANCE", "BatchEntryType", true).GetValueOrDefault();
        }
 public DonationsController()
 {
     container          = MvcApplication.BootstrapContainer();
     log                = container.Resolve <ILogger>();
     donationRepository = container.Resolve <IDonationRepository>();
     userRepository     = container.Resolve <IUserRepository>();
     requestRepository  = container.Resolve <IRequestRepository>();
 }
Beispiel #9
0
 public DonationAppService(IDonationRepository donationRepository,
                           IDonorRepository donorRepository,
                           IBloodCenterRepository bloodcenterRepository)
 {
     _donationRepository    = donationRepository ?? throw new System.ArgumentNullException(nameof(donationRepository));
     _donorRepository       = donorRepository ?? throw new System.ArgumentNullException(nameof(donorRepository));
     _bloodcenterRepository = bloodcenterRepository ?? throw new System.ArgumentNullException(nameof(bloodcenterRepository));
 }
Beispiel #10
0
 public DonationController(
     IDonationRepository donationRepository,
     IMapper mapper
     )
 {
     this.donationRepository = donationRepository;
     this.mapper             = mapper;
 }
Beispiel #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="contextParam">The context parameter.</param>
 /// <param name="organizationsListRepositoryParam">The organizations list repository parameter.</param>
 public UnitOfWork(FundTrackContext contextParam,
                   IOrganizationsForFilteringRepository organizationsListRepositoryParam,
                   IUserResporitory userListRepositoryParam,
                   IEventManagementRepository eventRepository,
                   IOrganizationRepository organizationRepository,
                   IMembershipRepository membershipRepositoryParam,
                   IRepository <Address> addressRepository,
                   IRepository <OrgAddress> orgAddressRepository,
                   IRepository <BankAccount> bankAccountRepository,
                   IRequestedItemRepository requestedItemRepository,
                   IRepository <Role> roleRepository,
                   IRepository <EventImage> eventImageRepositoryParam,
                   IRepository <OfferedItem> offeredItemRepository,
                   IStatusRepository statusRepository,
                   IUserResponseRepository userResponseRepository,
                   IGoodsCategoryRepository goodsCategoryRepository,
                   IRequestedItemImageRepository requestedItemImageRepository,
                   IGoodsTypeRepository goodsTypeRepository,
                   IOfferImagesRepository offeredItemImageRepository,
                   IBankImportDetailRepository bankImportDetailRepository,
                   IOrganizationAccountRepository organizationAccountRepository,
                   IRepository <Currency> currencyRepository,
                   ITargetRepository targetRepository,
                   IDonationRepository donationRepository,
                   IFinOpRepository finOpRepository,
                   IPhoneRepository phoneRepository,
                   IRepository <FinOpImage> finOpImagesRepository
                   )
 {
     this._context = contextParam;
     this._organizationsListRepository = organizationsListRepositoryParam;
     this._usersListRepository         = userListRepositoryParam;
     this._membershipRepository        = membershipRepositoryParam;
     _eventRepository               = eventRepository;
     _organizationRepository        = organizationRepository;
     _addressRepository             = addressRepository;
     _orgAddressRepository          = orgAddressRepository;
     _bankAccountRepository         = bankAccountRepository;
     _roleRepository                = roleRepository;
     _eventImageRepository          = eventImageRepositoryParam;
     _offeredItemRepository         = offeredItemRepository;
     _goodsCategoryRepository       = goodsCategoryRepository;
     _userResponseRepository        = userResponseRepository;
     _requestedItemRepository       = requestedItemRepository;
     _statusRepository              = statusRepository;
     _requestedItemImageRepository  = requestedItemImageRepository;
     _goodsTypeRepository           = goodsTypeRepository;
     _offeredItemImageRepository    = offeredItemImageRepository;
     _bankImportDetailRepository    = bankImportDetailRepository;
     _organizationAccountRepository = organizationAccountRepository;
     _currencyRepository            = currencyRepository;
     _targetRepository              = targetRepository;
     _donationRepository            = donationRepository;
     _finOpRepository               = finOpRepository;
     this._phoneRepository          = phoneRepository;
     _finOpImagesRepository         = finOpImagesRepository;
 }
Beispiel #12
0
        public DonationsService(IDonationRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            _repository = repository;
        }
Beispiel #13
0
        public DonationController()
        {
            //string de conexão com o banco
            string connectionString = ConfigurationManager.ConnectionStrings["conexao"].ToString();

            //injetando a dependencia do repositorio na aplicação
            DonationRepository  = new DonationRepository(connectionString);
            DonationApplication = new DonationApplication(DonationRepository);
        }
 public SchedulerController(ISchedulerRepository repository, ILogger log, ISession session, IDonationDetailsRepository donationDetailsRepository, IDonationRepository donationRepository)
     : base(repository, log)
 {
     this.log                       = log;
     this.session                   = session;
     this.repository                = repository;
     this.donationRepository        = donationRepository;
     this.donationDetailsRepository = donationDetailsRepository;
 }
        public DonationsService(IDonationRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            this.repository = repository;
        }
Beispiel #16
0
 public DashboardController(IUserAppService userService,
                            IDonationRepository donationRepository, IRepository <Package> packageRepository,
                            IRepository <Referral> referralRepository,
                            IRewardDonationRepository rewardDonationRepository) : base(userService)
 {
     _donationRepository       = donationRepository;
     _packageRepository        = packageRepository;
     _referralRepository       = referralRepository;
     _rewardDonationRepository = rewardDonationRepository;
 }
Beispiel #17
0
 public PackagesController(IUserAppService userService, IRepository <User, long> userRepository,
                           IRepository <Package> packageRepository, IRepository <PackageType> packageTypeRepository,
                           IDonationRepository donationRepository, IDonationAppService donationService) : base(userService)
 {
     _userRepository        = userRepository;
     _packageRepository     = packageRepository;
     _packageTypeRepository = packageTypeRepository;
     _donationRepository    = donationRepository;
     _donationService       = donationService;
 }
 public DonationService(
     IMapper mapper,
     IDonationRepository donationRepository,
     IDomainNotificationService domainNotificationService
     )
 {
     _mapper                    = mapper;
     _donationRepository        = donationRepository;
     _domainNotificationService = domainNotificationService;
 }
Beispiel #19
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="payPalVerificationService">IVerificationService implementation that verifies PayPal request.</param>
 /// <param name="donationRepository">IDonationRepository implementation for operations with database.</param>
 /// <param name="mapper">AutoMapper.</param>
 public PayPalService(
     IVerificationService payPalVerificationService,
     IDonationRepository donationRepository,
     IMapper mapper
     )
 {
     _payPalVerificationService = payPalVerificationService;
     _donationRepository        = donationRepository;
     _mapper = mapper;
 }
        public DonationManagementController(IDonorRepository donorRepository,
                                            IDonationRepository donationRepository, IProjectRepository projectRepository)
        {
            Guard.ArgumentNotNull(donationRepository, "donationRepository");
            Guard.ArgumentNotNull(donorRepository, "donorRepository");
            Guard.ArgumentNotNull(projectRepository, "projectRepository");

            _donorRepository    = donorRepository;
            _donationRepository = donationRepository;
            _projectRepository  = projectRepository;
        }
        public DonationManagementController(IDonorRepository donorRepository,
            IDonationRepository donationRepository, IProjectRepository projectRepository)
        {
            Guard.ArgumentNotNull(donationRepository, "donationRepository");
            Guard.ArgumentNotNull(donorRepository, "donorRepository");
            Guard.ArgumentNotNull(projectRepository, "projectRepository");

            _donorRepository = donorRepository;
            _donationRepository = donationRepository;
            _projectRepository = projectRepository;
        }
 public DonationService(IPayPalService paypalService, IGeocodeService geocodeService, IDonationRepository donationRepository, 
     IAccountRepository accountRepositoty, IEmailService emailService, ILog log)
 {
     _paypalService = paypalService;
     _geocodeService = geocodeService;
     _donationRepository = donationRepository;
     _accountRepository = accountRepositoty;
     _emailService = emailService;
     _paypalEmail = ConfigurationManager.AppSettings["PayPal:PrimaryEmail"];
     Log = log;
 }
Beispiel #23
0
 public DonationController(IDonationRepository donationService,
                           IFundraiserRepository fundraiserService,
                           IDonorRepository donorService,
                           IMapper mapper,
                           IHubContext <ZonorHub> signalHub)
 {
     this.donationService   = donationService ?? throw new ArgumentNullException(nameof(donationService));
     this.fundraiserService = fundraiserService ?? throw new ArgumentNullException(nameof(fundraiserService));
     this.donorService      = donorService ?? throw new ArgumentNullException(nameof(donorService));
     this.mapper            = mapper ?? throw new ArgumentNullException(nameof(mapper));
     this.signalHub         = signalHub ?? throw new ArgumentNullException(nameof(signalHub));
 }
Beispiel #24
0
 public DonationAppService(IRepository <Package> packageRepository, IRepository <PackageType> packageTypeRepository
                           , IRepository <DonationTicket> ticketRepository, IDonationRepository donationRepository,
                           IRepository <User, long> userRepository,
                           IRepository <ReferralRewardTicket> referralRewardTicket, IRepository <Referral> referralRepository)
 {
     _packageTypeRepository          = packageTypeRepository;
     _packageRepository              = packageRepository;
     _ticketRepository               = ticketRepository;
     _donationRepository             = donationRepository;
     _userRepository                 = userRepository;
     _referralRewardTicketRepository = referralRewardTicket;
     _referralRepository             = referralRepository;
 }
Beispiel #25
0
 public ProjectService(IProjectRepository projectRepository
                       , IProjectCategoryRepository projectCategoryRepository
                       , IMemberRepository memberRepository
                       , IDonationRepository donationRepository
                       , IFilterRepository filterRepository
                       , IRewardRepository rewardRepository)
 {
     _projectRepository         = projectRepository;
     _projectCategoryRepository = projectCategoryRepository;
     _memberRepository          = memberRepository;
     _donationRepository        = donationRepository;
     _filterRepository          = filterRepository;
     _rewardRepository          = rewardRepository;
 }
 public CommonService(ICustomHeaderRepository customHeaderRepository,
                      ICustomImageRepository customImageRepository,
                      IDonationRepository donationRepository,
                      IControlPanelRepository controlPanelRepository,
                      ILaudatoryRepository laudatoryRepository,
                      IUnitOfWork unitOfWork)
 {
     this._customHeaderRepository = customHeaderRepository;
     this._customImageRepository  = customImageRepository;
     this._donationRepository     = donationRepository;
     this._controlPanelRepository = controlPanelRepository;
     this._laudatoryRepository    = laudatoryRepository;
     this._unitOfWork             = unitOfWork;
 }
Beispiel #27
0
 public DonationController(IMediatorHandler mediator,
                           IDonationRepository donationRepository,
                           IDesiredRepository desiredRepository,
                           IGivenRepository givenRepository,
                           UserManager <IdentityUser> userManager,
                           IUserAdapter userAdapter,
                           INotificationHandler <DomainNotification> notifications,
                           IStringLocalizer <DonationController> localizer,
                           ILogger <DonationController> logger)
     : base(notifications, userManager, userAdapter, mediator, localizer, logger)
 {
     _donationRepository = donationRepository;
     _desiredRepository  = desiredRepository;
     _givenRepository    = givenRepository;
 }
 public DonationController(IDonationRepository repo, ICharityRepository catRepo,
                           ITargetAmountRepository goalRepo, ITargetTypeRepository goalTypeRepo, IAccountTypeRepository saveTypeRepo,
                           IAccountRepository saveRepo, IPaymentMethodRepository payRepo, ICreditBalanceRepository creditRepo,
                           IIncomeEntryRespository incomeRepo)
 {
     _repo         = repo;
     _catRepo      = catRepo;
     _goalRepo     = goalRepo;
     _goalTypeRepo = goalTypeRepo;
     _saveTypeRepo = saveTypeRepo;
     _saveRepo     = saveRepo;
     _payRepo      = payRepo;
     _creditRepo   = creditRepo;
     _incomeRepo   = incomeRepo;
 }
Beispiel #29
0
        private void Init()
        {
            var builder = new DbContextOptionsBuilder <FundraiseContext>()
                          .UseInMemoryDatabase("FundraiseTestDB");

            var context = new FundraiseContext(builder.Options);

            _donationRepository = new DonationRepository(context);

            var campaignRepository = new CampaignRepository(context);

            _testCampaign = campaignRepository.Create("test", "USD", null, null);

            var fundraiserRepository = new FundraiserRepository(context);

            _testFundraiser = fundraiserRepository.Create("test", _testCampaign.Id, FundraiserType.Individual, "test");
        }
Beispiel #30
0
 public PaymentsController(IHttpContextAccessor contextAccessor,
                           UserManager <ApplicationUser> userManager,
                           ILogger <PaymentsController> logger,
                           IPaymentRepository paymentRepository,
                           IDonationRepository donationRepository,
                           IMailSender mailSender,
                           IUnitOfWork uow,
                           IPaymentProcessor paymentProcessor,
                           IHttpClientFactory httpClientFactory) : base(contextAccessor, userManager,
                                                                        logger)
 {
     _paymentRepository       = paymentRepository;
     this._donationRepository = donationRepository;
     this._mailSender         = mailSender;
     _uow = uow;
     this._paymentProcessor = paymentProcessor;
     this._httpClient       = httpClientFactory.CreateClient("StripeInvoices");
 }
Beispiel #31
0
        public DonationRepositoryTest()
        {
            _apiUserRepository    = new Mock <IApiUserRepository>(MockBehavior.Strict);
            _restRequestBuilder   = new Mock <IMinistryPlatformRestRequestBuilderFactory>(MockBehavior.Strict);
            _configurationWrapper = new Mock <IConfigurationWrapper>(MockBehavior.Strict);
            _restRequest          = new Mock <IMinistryPlatformRestRequestBuilder>(MockBehavior.Strict);
            _mapper  = new Mock <IMapper>(MockBehavior.Strict);
            _request = new Mock <IMinistryPlatformRestRequest>();

            _apiUserRepository.Setup(r => r.GetDefaultApiUserToken()).Returns(token);
            _restRequestBuilder.Setup(m => m.NewRequestBuilder()).Returns(_restRequest.Object);
            _restRequest.Setup(m => m.WithAuthenticationToken(token)).Returns(_restRequest.Object);
            _restRequest.Setup(m => m.Build()).Returns(_request.Object);

            _fixture = new DonationRepository(_restRequestBuilder.Object,
                                              _apiUserRepository.Object,
                                              _configurationWrapper.Object,
                                              _mapper.Object);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DonationController"/> class.
 /// </summary>
 /// <param name="repo">
 /// The repo.
 /// </param>
 public DonationController(IDonationRepository repo)
 {
     this.repo = repo;
 }
 public void Setup()
 {
     _calculator         = Substitute.For <IGiftAidCalculator>();
     _donationRepository = Substitute.For <IDonationRepository>();
     _controller         = new GiftAidController(_calculator, _donationRepository);
 }
 public DonationsController(IDonationService donationService, IDonationRepository donationRepository)
 {
     _donationRepository = donationRepository;
     _donationService = donationService;
 }
Beispiel #35
0
 public DonationService(ILogger _logger, IDonationRepository _DonationRepo)
 {
     this._logger = _logger;
     this._IDonationRepo = _DonationRepo;
 }
Beispiel #36
0
 public FundraiserTotalSummary(IDonationRepository donationService,
                               IMapper mapper)
 {
     this.donationService = donationService ?? throw new ArgumentNullException(nameof(donationService));
     this.mapper          = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }