コード例 #1
0
ファイル: ServerGod.cs プロジェクト: decka/Caddy
 public ServerGod(IPurchasesRepository purchasesRepository)
 {
     //Dependency Injection of Repository
     this.PurchasesRepository    = purchasesRepository;
     this.RegisteredClients      = new List <Client>();
     this.RegisteredDatabaseKeys = new List <string>();
 }
コード例 #2
0
ファイル: ServerGod.cs プロジェクト: decka/Caddy
 public ServerGod(IPurchasesRepository purchasesRepository)
 {
     //Dependency Injection of Repository
     this.PurchasesRepository = purchasesRepository;
     this.RegisteredClients = new List<Client>();
     this.RegisteredDatabaseKeys = new List<string>();
 }
コード例 #3
0
 public DataServiceController(IPurchasesRepository purRep, IMembershipsRepository mRep, IMembersRepository memRep, IMerchantsRepository merRep, IInvestmentUnitsRepository invuRep, IYesrRepository ysrRep)
 {
     _purchasesRepository = purRep;
     _membershipsRepository = mRep;
     _membersRepository = memRep;
     _merchantsRepository = merRep;
     _investmentUnitsRepository = invuRep;
     _yesrRepository = ysrRep;
 }
コード例 #4
0
 public HomeController(IMembershipsRepository memsRep, IPurchasesRepository purRep, ICashBackBonusesRepository cbRep, IReferralBonusesRepository refRep, IAccumulationReservesRepository arRep, IInvestmentUnitsRepository iuRep, IDividendBonusesRepository divRep, IYesrRepository ysrRep)
 {
     _membershipsRepository = memsRep;
     _purchasesRepository = purRep;
     _cashBackBonusesRepository = cbRep;
     _referralBonusesRepository = refRep;
     _accumulationReservesRepository = arRep;
     _investmentUnitsRepository = iuRep;
     _dividendBonusesRepository = divRep;
     _yesrRepository = ysrRep;
 }
コード例 #5
0
        public void PrepareRepositories(bool initialize = false)
        {
            // Kick the model creation process if not already created (hence force is false). In other words, do
            // not wait on any database activities. Without this, nothing happens unless some context activities take
            // place.
            _context = new YContext();
            if (initialize)
            {
                // Kick the model creation process if not already created (hence force is false). In other words, do
                // not wait on any database activities. Without this, nothing happens unless some context activities take
                // place.
                _context.Database.Initialize(force: false);
            }

            _timeZonesRepository = new TimeZonesRepository(_context);
            _channelsRepository = new ChannelsRepository(_context);
            _contactsRepository = new ContactsRepository(_context);
            _regionsRepository = new RegionsRepository(_context);
            _countriesRepository = new CountriesRepository(_context);
            _currenciesRepository = new CurrenciesRepository(_context);
            _languagesRepository = new LanguagesRepository(_context);
            _merchantsRepository = new MerchantsRepository(_context);
            _memberTypesRepository = new MemberTypesRepository(_context);
            _investmentSchemesRepository = new InvestmentSchemesRepository(_context);
            _invoicesRepository = new InvoicesRepository(_context);
            _periodsRepository = new PeriodsRepository(_context);
            _sponsorsRepository = new SponsorsRepository(_context, _invoicesRepository);
            _payoutEventsRepository = new PayoutEventsRepository(_context);
            _investmentUnitsRepository = new InvestmentUnitsRepository(_context, _sponsorsRepository, _invoicesRepository, _payoutEventsRepository);
            _instancesRepository = new InstancesRepository(_context, _sponsorsRepository, _countriesRepository, _regionsRepository, _investmentSchemesRepository, _currenciesRepository);
            _membersRepository = new MembersRepository(_context, _channelsRepository, _contactsRepository, _languagesRepository, _currenciesRepository, _timeZonesRepository, _memberTypesRepository, _merchantsRepository, _sponsorsRepository, _countriesRepository);
            _enrollmentsRepository = new EnrollmentsRepository(_context, _periodsRepository);
            _purchasesRepository = new PurchasesRepository(_context, _periodsRepository, _invoicesRepository);
            _cashBackBonusesRepository = new CashBackBonusesRepository(_context);
            _adminFeesRepository = new AdminFeesRepository(_context);
            _accumulationReservesRepository = new AccumulationReservesRepository(_context, _investmentUnitsRepository);
            _referralBonusesRepository = new ReferralBonusesRepository(_context);
            _membershipsRepository = new MembershipsRepository(_context, _membersRepository, _enrollmentsRepository, _purchasesRepository, _cashBackBonusesRepository, _adminFeesRepository, _accumulationReservesRepository, _referralBonusesRepository, _instancesRepository, _merchantsRepository, _investmentUnitsRepository, _periodsRepository, _currenciesRepository);
            _yesrRepository = new YesrRepository(_context);
        }
コード例 #6
0
 public PurchasesService(IPurchasesRepository repository) => _repository = repository;
コード例 #7
0
 public HomeController(IMerchantsRepository merRep, IPurchasesRepository purRep)
 {
     _merchantsRepository = merRep;
     _purchasesRepository = purRep;
 }
コード例 #8
0
 public PurchasesService(IPurchasesRepository purchasesRepository)
 {
     _purchasesRepository = purchasesRepository;
 }
コード例 #9
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="purchasesRepository">The injected and implamented IPurchasesRepository instance.</param>
 public PurchasesController(IPurchasesRepository purchasesRepository)
 {
     this.purchasesRepository = purchasesRepository;
 }
コード例 #10
0
 public StorePurchaseConsumer(IPurchasesRepository repository) => _repository = repository;
コード例 #11
0
 public PurchasesController(IPurchasesRepository purchasesRepository, IEmailSender emailsender, IOptions <AppSettings> appSettings)
 {
     _purchasesRepository = purchasesRepository;
     _emailsender         = emailsender;
     _appSettings         = appSettings.Value;
 }