Exemple #1
0
 public ResultService(IResultRepository resultRepository, IAccountInfoRepository accountInfoRepository, IResultModelMapper resultMapper, IResultAccountModelMapper resultAccountModelMapper)
 {
     _resultRepository = resultRepository;
     _resultAccountModelMapper = resultAccountModelMapper;
     _resultMapper = resultMapper;
     _accountInfoRepository = accountInfoRepository;
 }
 public void SetUp()
 {
     _accountInfoRepository = new AccountInfoRepository();
     _accountInfo1 = new AccountInfoDTO {AccountNumber = 3001, AccountName = "testkonto1", IsIncome = true, PartsReportCategory = 1, ResultReportCategory = 1, WeekCategory = 1, Year = 2011};
     _accountInfo2 = new AccountInfoDTO { AccountNumber = 3002, AccountName = "testkonto2", IsIncome = true, PartsReportCategory = 2, ResultReportCategory = 2, WeekCategory = 2, Year = 2012 };
     _accountInfo3 = new AccountInfoDTO { AccountNumber = 3003, AccountName = "testkonto3", IsIncome = true, PartsReportCategory = 3, ResultReportCategory = 3, WeekCategory = 3, Year = 2013 };
 }
Exemple #3
0
 public LoginEventHandler(IAllRedisRepository accountRedisRep, IAccountInfoRepository accountRep, IBusControl mqBus, IMapper mapper)
 {
     _redisRep   = accountRedisRep;
     _accountRep = accountRep;
     _mqBus      = mqBus;
     _mapper     = mapper;
 }
Exemple #4
0
 public ResultService(IResultRepository resultRepository, IAccountInfoRepository accountInfoRepository, IResultModelMapper resultMapper, IResultAccountModelMapper resultAccountModelMapper)
 {
     _resultRepository         = resultRepository;
     _resultAccountModelMapper = resultAccountModelMapper;
     _resultMapper             = resultMapper;
     _accountInfoRepository    = accountInfoRepository;
 }
 /// <summary>
 /// Standard constructor.
 /// </summary>
 /// <param name="accountRepository">Repo to use for account information.</param>
 /// <param name="accountInfoRepository">Repo for account balance and other information.</param>
 /// <param name="accountTemplateRepository">Repo fro account template information.</param>
 /// <param name="accountTypeRepository">Repo for account type information.</param>
 /// <param name="requestLogger">Logger used to log information about request.</param>
 public AccountService(IAccountRepository accountRepository, IAccountInfoRepository accountInfoRepository, IAccountTemplateRepository accountTemplateRepository, IAccountTypeRepository accountTypeRepository, IApiRequestLogger requestLogger)
 {
     RequestLogger         = requestLogger;
     AccountRepo           = accountRepository;
     AccountInfoRepo       = accountInfoRepository;
     AccountTemplateRepo   = accountTemplateRepository;
     AccountTypeRepository = accountTypeRepository;
 }
Exemple #6
0
 public OfferService(IOfferRepository offersRepository, IOrderRepository ordersRepository, IFeedbackRepository feedbacksRepository, IStatusLogRepository statusLogsRepository, IUnitOfWork unitOfWork, IAccountInfoRepository accountInfosRepository, ITransactionRepository transactionsRepository)
 {
     this.ordersRepository       = ordersRepository;
     this.feedbacksRepository    = feedbacksRepository;
     this.statusLogsRepository   = statusLogsRepository;
     this.transactionsRepository = transactionsRepository;
     this.accountInfosRepository = accountInfosRepository;
     this.offersRepository       = offersRepository;
     this.unitOfWork             = unitOfWork;
 }
Exemple #7
0
 public GetAccountCmdHandler(IAllRedisRepository accountRedisRep,
                             IAccountInfoRepository accountRep,
                             IMediatorHandler bus, IRequestClient <GetMoneyMqCmd> moneyClient, IMapper mapper)
 {
     _redisRep    = accountRedisRep;
     _bus         = bus;
     _moneyClient = moneyClient;
     _mapper      = mapper;
     _accountRep  = accountRep;
 }
 public AccountEventHandler(IAccountInfoRepository rep,
                            IAccountRedisRepository redis,
                            IBusControl mqBus,
                            IMapper mapper)
 {
     _accountRepository = rep;
     _redis             = redis;
     _mqBus             = mqBus;
     _mapper            = mapper;
 }
 public LoginCmdHandler(IAllRedisRepository accountRedisRep, IAccountInfoRepository accountRep,
                        IUserIdGenRepository genRepository, IMediatorHandler bus, IRequestClient <GetMoneyMqCmd> moneyClient,
                        IRequestClient <AddMoneyMqCmd> moneyAddClient)
 {
     _redisRep       = accountRedisRep;
     _accountRep     = accountRep;
     _genRepository  = genRepository;
     _bus            = bus;
     _moneyClient    = moneyClient;
     _moneyAddClient = moneyAddClient;
 }
 public void SetUp()
 {
     _accountInfoRepository = new AccountInfoRepository();
     _accountInfo1          = new AccountInfoDTO {
         AccountNumber = 3001, AccountName = "testkonto1", IsIncome = true, PartsReportCategory = 1, ResultReportCategory = 1, WeekCategory = 1, Year = 2011
     };
     _accountInfo2 = new AccountInfoDTO {
         AccountNumber = 3002, AccountName = "testkonto2", IsIncome = true, PartsReportCategory = 2, ResultReportCategory = 2, WeekCategory = 2, Year = 2012
     };
     _accountInfo3 = new AccountInfoDTO {
         AccountNumber = 3003, AccountName = "testkonto3", IsIncome = true, PartsReportCategory = 3, ResultReportCategory = 3, WeekCategory = 3, Year = 2013
     };
 }
Exemple #11
0
        public static async Task <AccountInfo> GetAccountInfo(long id, IAccountInfoRepository _accountRepository, IAccountRedisRepository _redis)
        {
            var accountInfo = await _redis.GetAccountInfo(id);

            if (accountInfo == null)
            {
                accountInfo = await _accountRepository.GetByIdAsync(id);

                if (accountInfo != null)
                {
                    await _redis.SetAccountInfo(accountInfo);
                }
            }
            return(accountInfo);
        }
 public MatchingEngine(IDictionaryProxy dictionaryProxy,
                       IAccountInfoRepository accountInfoRepository, IAssetPairQuoteRepository assetPairQuoteRepository,
                       IMarketOrderRepository marketOrderRepository, IPendingOrderRepository pendingOrderRepository,
                       ITransactionHistoryRepository transactionHistoryRepository, IOrderCalculator orderCalculator,
                       IMatchingEngineEventSubscriber matchingEngineEventSubscriber, IOrderBookService orderBookService)
 {
     _dictionaryProxy               = dictionaryProxy;
     _accountInfoRepository         = accountInfoRepository;
     _assetPairQuoteRepository      = assetPairQuoteRepository;
     _marketOrderRepository         = marketOrderRepository;
     _pendingOrderRepository        = pendingOrderRepository;
     _transactionHistoryRepository  = transactionHistoryRepository;
     _orderCalculator               = orderCalculator;
     _matchingEngineEventSubscriber = matchingEngineEventSubscriber;
     _orderBookService              = orderBookService;
 }
 public GetAccountCommandHandler(IAccountInfoRepository rep,
                                 IUserIdGenRepository genRepository,
                                 IAccountRedisRepository redis,
                                 IMediatorHandler bus,
                                 IBusControl mqBus, IMapper mapper,
                                 IRequestClient <GetMoneyMqCommand> moneyClient,
                                 IRequestClient <GetFriendInfoMqCommand> friednClient)
 {
     _accountRepository = rep;
     _genRepository     = genRepository;
     _redis             = redis;
     _bus          = bus;
     _mqBus        = mqBus;
     _mapper       = mapper;
     _moneyClient  = moneyClient;
     _friednClient = friednClient;
 }
Exemple #14
0
        public static async Task <long?> GetIdByPlatForm(string platformId, IAccountInfoRepository _accountRepository, IAllRedisRepository _redis)
        {
            var checkInfo = await _redis.GetLoginCheckInfo(platformId);

            if (checkInfo == null)
            {
                AccountInfo accountInfo = await _accountRepository.GetByPlatform(platformId);

                if (accountInfo != null)
                {
                    await _redis.SetLoginCheckInfo(platformId, accountInfo);

                    return(accountInfo.Id);
                }
                return(null);
            }
            return(checkInfo.Id);
        }
Exemple #15
0
 public AccountCommandHandler(IAccountInfoRepository rep,
                              IUserIdGenRepository genRepository,
                              IAccountRedisRepository redis,
                              IMediatorHandler bus,
                              IMapper mapper,
                              IRequestClient <GetMoneyMqCommand> moneyClient,
                              WSHostManager hostManager, InitRewardInfo initRewardInfo,
                              IRequestClient <AddMoneyMqCommand> moneyAddClient)
 {
     _accountRepository = rep;
     _genRepository     = genRepository;
     _redis             = redis;
     _bus            = bus;
     _mapper         = mapper;
     _moneyClient    = moneyClient;
     _hostManager    = hostManager;
     _initRewardInfo = initRewardInfo;
     _moneyAddClient = moneyAddClient;
 }
Exemple #16
0
 public AccountAppService(IAccountInfoRepository repository, IMapper mapper, IMediatorHandler bus)
 {
     _repository = repository;
     _mapper     = mapper;
     _bus        = bus;
 }
Exemple #17
0
 public AccountInfoService(IAccountInfoRepository accountInfoRepository)
 {
     _accountInfoRepository = accountInfoRepository;
 }
Exemple #18
0
 public AccountInfoService(IAccountInfoRepository accountInfoRepository)
 {
     _accountInfoRepository = accountInfoRepository;
 }
Exemple #19
0
 public AccountEventHandler(IAllRedisRepository redisRep, IAccountInfoRepository accountRep)
 {
     _redisRep   = redisRep;
     _accountRep = accountRep;
 }
Exemple #20
0
 public AccountInfoService(IAccountInfoRepository repository)
 {
     _repository = repository;
 }
Exemple #21
0
 public AccountInfoController(IAccountInfoRepository accountInfoRepository)
 {
     this.accountRepository = accountInfoRepository;
 }
Exemple #22
0
 public AccountInfoService(IAccountInfoRepository accountInfoRepository, IUnitOfWork unitOfWork)
 {
     this.accountInfoRepository = accountInfoRepository;
     this.unitOfWork            = unitOfWork;
 }