public FakeExchangeConnectorService(
     IQuoteCacheService quoteService,
     IChaosKitty chaosKitty)
 {
     _quoteService = quoteService;
     _chaosKitty   = chaosKitty;
 }
 public DepositSaga(CqrsContextNamesSettings contextNames,
                    IOperationExecutionInfoRepository executionInfoRepository, IChaosKitty chaosKitty)
 {
     _contextNames            = contextNames;
     _executionInfoRepository = executionInfoRepository;
     _chaosKitty = chaosKitty;
 }
 private CashinRepository(
     INoSQLTableStorage <CashinEntity> storage,
     IChaosKitty chaosKitty)
 {
     _storage    = storage;
     _chaosKitty = chaosKitty;
 }
Exemple #4
0
 public BatchSaga(
     IChaosKitty chaosKitty,
     ICashoutsBatchReadOnlyRepository cashoutsBatchRepository)
 {
     _chaosKitty = chaosKitty;
     _cashoutsBatchRepository = cashoutsBatchRepository;
 }
 public ClearBroadcastedTransactionCommandsHandler(
     IChaosKitty chaosKitty,
     IBlockchainApiClientProvider apiClientProvider)
 {
     _chaosKitty = chaosKitty;
     _apiClientProvider = apiClientProvider;
 }
Exemple #6
0
 public CashoutSaga(
     IChaosKitty chaosKitty,
     ICashoutRepository cashoutRepository)
 {
     _chaosKitty        = chaosKitty;
     _cashoutRepository = cashoutRepository;
 }
Exemple #7
0
 public UpdateEmployeeCredentialsCommandHandler(
     [NotNull] IChaosKitty chaosKitty,
     [NotNull] IEmployeeCredentialsService employeeCredentialsService)
 {
     _chaosKitty = chaosKitty ?? throw new ArgumentNullException(nameof(chaosKitty));
     _employeeCredentialsService = employeeCredentialsService ?? throw new ArgumentNullException(nameof(employeeCredentialsService));
 }
 public RiskControlSaga(
     IChaosKitty chaosKitty,
     ICashoutRiskControlRepository riskControlRepository)
 {
     _chaosKitty            = chaosKitty;
     _riskControlRepository = riskControlRepository;
 }
Exemple #9
0
        public static ISnapshotRepository Create(
            IReloadingManager <string> connectionString,
            ILogFactory logFactory,
            IChaosKitty chaosKitty)
        {
            var snapshotTable = AzureTableStorage <SnapshotEntity> .Create
                                (
                connectionStringManager : connectionString,
                tableName : "Snapshots",
                logFactory : logFactory
                                );

            var balanceTable = AzureTableStorage <SnapshotBalanceEntity> .Create
                               (
                connectionStringManager : connectionString,
                tableName : "SnapshotBalances",
                logFactory : logFactory
                               );

            return(new SnapshotRepository
                   (
                       chaosKitty,
                       snapshotTable,
                       balanceTable
                   ));
        }
Exemple #10
0
 public SpecialLiquidationCommandsHandler(
     ITradingEngine tradingEngine,
     IDateService dateService,
     IOrderReader orderReader,
     IChaosKitty chaosKitty,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     ILog log,
     MarginTradingSettings marginTradingSettings,
     IAssetPairsCache assetPairsCache,
     IAssetPairDayOffService assetPairDayOffService,
     IExchangeConnectorService exchangeConnectorService,
     IIdentityGenerator identityGenerator,
     IAccountsCacheService accountsCacheService)
 {
     _tradingEngine = tradingEngine;
     _dateService   = dateService;
     _orderReader   = orderReader;
     _chaosKitty    = chaosKitty;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _log = log;
     _marginTradingSettings    = marginTradingSettings;
     _assetPairsCache          = assetPairsCache;
     _assetPairDayOffService   = assetPairDayOffService;
     _exchangeConnectorService = exchangeConnectorService;
     _identityGenerator        = identityGenerator;
     _accountsCacheService     = accountsCacheService;
 }
        public DepositWalletsBalanceProcessingPeriodicalHandler(
            ILogFactory logFactory,
            TimeSpan period,
            int batchSize,
            string blockchainType,
            IBlockchainApiClientProvider blockchainApiClientProvider,
            ICqrsEngine cqrsEngine,
            IAssetsServiceWithCache assetsService,
            IEnrolledBalanceRepository enrolledBalanceRepository,
            IHotWalletsProvider hotWalletsProvider,
            ICashinRepository cashinRepository,
            IDepositWalletLockRepository depositWalletLockRepository,
            IChaosKitty chaosKitty)
        {
            _logFactory                  = logFactory;
            _batchSize                   = batchSize;
            _blockchainType              = blockchainType;
            _blockchainApiClient         = blockchainApiClientProvider.Get(blockchainType);
            _cqrsEngine                  = cqrsEngine;
            _assetsService               = assetsService;
            _enrolledBalanceRepository   = enrolledBalanceRepository;
            _hotWalletsProvider          = hotWalletsProvider;
            _cashinRepository            = cashinRepository;
            _depositWalletLockRepository = depositWalletLockRepository;
            _chaosKitty                  = chaosKitty;

            _timer = new TimerTrigger(
                $"{nameof(DepositWalletsBalanceProcessingPeriodicalHandler)} : {blockchainType}",
                period,
                _logFactory);

            _timer.Triggered += ProcessBalancesAsync;
        }
Exemple #12
0
 public LiquidationCommandsHandler(
     IAccountsCacheService accountsCache,
     IDateService dateService,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     IChaosKitty chaosKitty,
     ITradingEngine tradingEngine,
     OrdersCache ordersCache,
     ILog log,
     IAccountUpdateService accountUpdateService,
     IEventChannel <LiquidationEndEventArgs> liquidationEndEventChannel,
     LiquidationHelper liquidationHelper,
     ILiquidationFailureExecutor failureExecutor)
 {
     _accountsCache = accountsCache;
     _dateService   = dateService;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _chaosKitty                 = chaosKitty;
     _tradingEngine              = tradingEngine;
     _ordersCache                = ordersCache;
     _log                        = log;
     _accountUpdateService       = accountUpdateService;
     _liquidationEndEventChannel = liquidationEndEventChannel;
     _liquidationHelper          = liquidationHelper;
     _failureExecutor            = failureExecutor;
 }
Exemple #13
0
 public FailBatchCommandsHandler(
     IChaosKitty chaosKitty,
     ICashoutsBatchRepository cashoutsBatchRepository)
 {
     _chaosKitty = chaosKitty;
     _cashoutsBatchRepository = cashoutsBatchRepository;
 }
Exemple #14
0
 public ReleaseSourceAddressLockCommandsHandler(
     IChaosKitty chaosKitty,
     ISourceAddresLocksRepoistory locksRepoistory)
 {
     _chaosKitty      = chaosKitty;
     _locksRepoistory = locksRepoistory;
 }
Exemple #15
0
 public LiquidationCommandsHandler(
     ITradingInstrumentsCacheService tradingInstrumentsCacheService,
     IAccountsCacheService accountsCache,
     IDateService dateService,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     IChaosKitty chaosKitty,
     IMatchingEngineRouter matchingEngineRouter,
     ITradingEngine tradingEngine,
     OrdersCache ordersCache,
     ILog log,
     IAccountUpdateService accountUpdateService,
     IEventChannel <LiquidationEndEventArgs> liquidationEndEventChannel)
 {
     _tradingInstrumentsCacheService = tradingInstrumentsCacheService;
     _accountsCache = accountsCache;
     _dateService   = dateService;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _chaosKitty           = chaosKitty;
     _matchingEngineRouter = matchingEngineRouter;
     _tradingEngine        = tradingEngine;
     _ordersCache          = ordersCache;
     _log = log;
     _accountUpdateService       = accountUpdateService;
     _liquidationEndEventChannel = liquidationEndEventChannel;
 }
Exemple #16
0
 public BalancesUpdateProjection(
     [NotNull] ICachedWalletsRepository cachedWalletsRepository,
     [NotNull] IChaosKitty chaosKitty)
 {
     _cachedWalletsRepository = cachedWalletsRepository ?? throw new ArgumentNullException(nameof(cachedWalletsRepository));
     _chaosKitty = chaosKitty ?? throw new ArgumentNullException(nameof(chaosKitty));
 }
Exemple #17
0
 public AssetPairHandler(
     [NotNull] IChaosKitty chaosKitty,
     [NotNull] IAssetPairRepository assetPairRepository)
 {
     _chaosKitty          = chaosKitty ?? throw new ArgumentNullException(nameof(chaosKitty));
     _assetPairRepository = assetPairRepository ?? throw new ArgumentNullException(nameof(assetPairRepository));
 }
Exemple #18
0
 public RetrieveClientCommandHandler(
     IChaosKitty chaosKitty,
     IBlockchainWalletsClient walletsClient)
 {
     _chaosKitty    = chaosKitty;
     _walletsClient = walletsClient;
 }
Exemple #19
0
        public static IDistributionPlanRepository Create(
            IReloadingManager <string> connectionString,
            ILogFactory logFactory,
            IChaosKitty chaosKitty)
        {
            var distributionAmountTable = AzureTableStorage <DistributionAmountEntity> .Create
                                          (
                connectionStringManager : connectionString,
                tableName : "DistributionAmounts",
                logFactory : logFactory
                                          );

            var distributionPlanIndexTable = AzureTableStorage <AzureIndex> .Create
                                             (
                connectionStringManager : connectionString,
                tableName : "DistributionPlanIndices",
                logFactory : logFactory
                                             );

            var distributionPlanTable = AzureTableStorage <DistributionPlanEntity> .Create
                                        (
                connectionStringManager : connectionString,
                tableName : "DistributionPlans",
                logFactory : logFactory
                                        );

            return(new DistributionPlanRepository
                   (
                       chaosKitty,
                       distributionAmountTable,
                       distributionPlanIndexTable,
                       distributionPlanTable
                   ));
        }
Exemple #20
0
 public BalancesController(AssetRepository assets, DepositWalletRepository depositWallets, IBlockchainApi api, IChaosKitty chaosKitty = null)
 {
     _assets         = assets;
     _depositWallets = depositWallets;
     _api            = api;
     _chaosKitty     = chaosKitty;
 }
Exemple #21
0
 public SpecialLiquidationSaga(
     IDateService dateService,
     IChaosKitty chaosKitty,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     IRfqService specialLiquidationService,
     MarginTradingSettings marginTradingSettings,
     CqrsContextNamesSettings cqrsContextNamesSettings,
     LiquidationHelper liquidationHelper,
     OrdersCache ordersCache,
     IRfqPauseService rfqPauseService,
     ILog log,
     IAssetPairsCache assetPairsCache)
 {
     _dateService = dateService;
     _chaosKitty  = chaosKitty;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _specialLiquidationService        = specialLiquidationService;
     _marginTradingSettings            = marginTradingSettings;
     _cqrsContextNamesSettings         = cqrsContextNamesSettings;
     _liquidationHelper = liquidationHelper;
     _ordersCache       = ordersCache;
     _rfqPauseService   = rfqPauseService;
     _log             = log;
     _assetPairsCache = assetPairsCache;
 }
 public BroadcastTransactionCommandHandler(IBlockchainApiClient client,
                                           ILogFactory logFactory,
                                           IChaosKitty chaosKitty)
 {
     _client     = client;
     _chaosKitty = chaosKitty;
     _log        = logFactory.CreateLog(this);
 }
Exemple #23
0
 public GeneratePasswordResetTokenCommandHandler(
     [NotNull] IChaosKitty chaosKitty,
     [NotNull] IResetPasswordAccessTokenService accessTokenService,
     [NotNull] string resetPasswordUrlTemplate)
 {
     _chaosKitty               = chaosKitty ?? throw new ArgumentNullException(nameof(chaosKitty));
     _accessTokenService       = accessTokenService ?? throw new ArgumentNullException(nameof(accessTokenService));
     _resetPasswordUrlTemplate = resetPasswordUrlTemplate ?? throw new ArgumentNullException(nameof(resetPasswordUrlTemplate));
 }
 public RegisterEmployeeCommandHandler(
     [NotNull] IEmployeeService employeeService,
     [NotNull] ILogFactory logFactory,
     [NotNull] IChaosKitty chaosKitty)
 {
     _employeeService = employeeService ?? throw new ArgumentNullException(nameof(employeeService));
     _chaosKitty = chaosKitty ?? throw new ArgumentNullException(nameof(chaosKitty));
     _log = logFactory.CreateLog(this);
 }
Exemple #25
0
 public RevokeActiveBatchIdCommandsHandler(
     IChaosKitty chaosKitty,
     IActiveCashoutsBatchIdRepository activeCashoutsBatchIdRepository,
     ICashoutsBatchRepository cashoutsBatchRepository)
 {
     _chaosKitty = chaosKitty;
     _activeCashoutsBatchIdRepository = activeCashoutsBatchIdRepository;
     _cashoutsBatchRepository         = cashoutsBatchRepository;
 }
Exemple #26
0
 public SnapshotRepository(
     IChaosKitty chaosKitty,
     INoSQLTableStorage <SnapshotEntity> snapshotTable,
     INoSQLTableStorage <SnapshotBalanceEntity> balanceTable)
 {
     _chaosKitty    = chaosKitty;
     _snapshotTable = snapshotTable;
     _balanceTable  = balanceTable;
 }
 public MatchingEngineCallDeduplicationsProjection(
     IMatchingEngineCallsDeduplicationRepository deduplicationRepository,
     ICrossClientCashoutRepository crossClientCashoutRepository,
     IChaosKitty chaosKitty)
 {
     _deduplicationRepository      = deduplicationRepository;
     _crossClientCashoutRepository = crossClientCashoutRepository;
     _chaosKitty = chaosKitty;
 }
 public TransactionExecutionSaga(
     IChaosKitty chaosKitty,
     ITransactionExecutionsRepository repository,
     IStateSwitcher <TransactionExecutionAggregate> stateSwitcher)
 {
     _chaosKitty    = chaosKitty;
     _repository    = repository;
     _stateSwitcher = stateSwitcher;
 }
 public MatchingEngineCallDeduplicationsProjection(
     IMatchingEngineCallsDeduplicationRepository deduplicationRepository,
     ICashinRepository cashinRepository,
     IChaosKitty chaosKitty)
 {
     _deduplicationRepository = deduplicationRepository;
     _chaosKitty       = chaosKitty;
     _cashinRepository = cashinRepository;
 }
Exemple #30
0
 public AssetPairFlagsCommandsHandler(
     IAssetPairsRepository assetPairsRepository,
     IConvertService convertService,
     IChaosKitty chaosKitty)
 {
     _assetPairsRepository = assetPairsRepository;
     _convertService       = convertService;
     _chaosKitty           = chaosKitty;
 }