public TransactionHandlerService(ILogger <ITransactionHandlerService> logger, IOptions <BotConfiguration> botConfiguration,
                                  IMhcHttpClient mhcHttpClient, ITransactionHistoryRepository transactionHistoryRepository,
                                  ITransactionCheckHistoryRepository transactionCheckHistoryRepository,
                                  IWalletUserRepository walletUserRepository, IUserBalanceRepository userBalanceRepository,
                                  IUserBalanceHistoryRepository userBalanceHistoryRepository, IBotService botService)
 {
     _logger                            = logger ?? throw new ArgumentNullException(nameof(logger));
     _botConfiguration                  = botConfiguration ?? throw new ArgumentNullException(nameof(botConfiguration));
     _mhcHttpClient                     = mhcHttpClient ?? throw new ArgumentNullException(nameof(mhcHttpClient));
     _transactionHistoryRepository      = transactionHistoryRepository ?? throw new ArgumentNullException(nameof(transactionHistoryRepository));
     _transactionCheckHistoryRepository = transactionCheckHistoryRepository ?? throw new ArgumentNullException(nameof(transactionCheckHistoryRepository));
     _walletUserRepository              = walletUserRepository ?? throw new ArgumentNullException(nameof(walletUserRepository));
     _userBalanceRepository             = userBalanceRepository ?? throw new ArgumentNullException(nameof(userBalanceRepository));
     _userBalanceHistoryRepository      = userBalanceHistoryRepository ?? throw new ArgumentNullException(nameof(userBalanceHistoryRepository));
     _botService                        = botService ?? throw new ArgumentNullException(nameof(botService));
 }
예제 #2
0
 public TipService(IUserBalanceRepository userBalanceRepository, IUserBalanceHistoryRepository userBalanceHistoryRepository, IWithdrawalRepository withdrawalRepository)
 {
     _userBalanceRepository        = userBalanceRepository ?? throw new ArgumentNullException(nameof(userBalanceRepository));
     _userBalanceHistoryRepository = userBalanceHistoryRepository ?? throw new ArgumentNullException(nameof(userBalanceHistoryRepository));
     _withdrawalRepository         = withdrawalRepository ?? throw new ArgumentNullException(nameof(withdrawalRepository));
 }