public AssetPairSettingsService( [NotNull] IReadOnlyList <AssetPairSetting> assetPairLocalStorageSettings, [NotNull] IAssetsLocalCache assetsLocalCache) { _assetPairLocalStorageSettings = assetPairLocalStorageSettings ?? throw new ArgumentNullException(nameof(assetPairLocalStorageSettings)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); }
public EthereumIataApiClient( [NotNull] IEthereumCoreAPI ethereumServiceClient, [NotNull] EthereumBlockchainSettings ethereumSettings, [NotNull] IAssetsLocalCache assetsLocalCache, [NotNull] IAssetsService assetsService, [NotNull] ILykkeAssetsResolver lykkeAssetsResolver, [NotNull] ILogFactory logFactory, [NotNull] RetryPolicySettings retryPolicySettings) { _ethereumServiceClient = ethereumServiceClient ?? throw new ArgumentNullException(nameof(ethereumServiceClient)); _ethereumSettings = ethereumSettings ?? throw new ArgumentNullException(nameof(ethereumSettings)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _assetsService = assetsService ?? throw new ArgumentNullException(nameof(assetsService)); _lykkeAssetsResolver = lykkeAssetsResolver ?? throw new ArgumentNullException(nameof(lykkeAssetsResolver)); _retryPolicySettings = retryPolicySettings ?? throw new ArgumentNullException(nameof(retryPolicySettings)); _log = logFactory.CreateLog(this); _retryPolicy = Policy .HandleResult <object>(r => { if (r is ApiException apiException) { return(apiException.Error?.Code == ExceptionType.None); } return(false); }) .WaitAndRetryAsync( _retryPolicySettings.DefaultAttempts, attempt => TimeSpan.FromSeconds(Math.Pow(2, attempt)), (ex, timespan) => _log.Error(message: "Connecting ethereum core with retry", context: ex)); }
public LykkeAssetsResolver( AssetsMapSettings assetsMapSettings, IAssetsLocalCache assetsLocalCache) { _assetsMapSettings = assetsMapSettings; _assetsLocalCache = assetsLocalCache; }
public MarkupsController( [NotNull] IMarkupService markupService, [NotNull] ILogFactory logFactory, [NotNull] IAssetsLocalCache assetsLocalCache) { _markupService = markupService ?? throw new ArgumentNullException(nameof(markupService)); _log = logFactory.CreateLog(this); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); }
public AssetRatesController( [NotNull] IAssetRatesService assetRatesService, [NotNull] IAssetsLocalCache assetsLocalCache, [NotNull] ILykkeAssetsResolver lykkeAssetsResolver, [NotNull] ILogFactory logFactory) { _assetRatesService = assetRatesService ?? throw new ArgumentNullException(nameof(assetRatesService)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _lykkeAssetsResolver = lykkeAssetsResolver ?? throw new ArgumentNullException(nameof(lykkeAssetsResolver)); _log = logFactory.CreateLog(this); }
public AssetSettingsService( [NotNull] IAssetGeneralSettingsRepository assetGeneralAvailabilityRepository, [NotNull] IAssetMerchantSettingsRepository assetPersonalAvailabilityRepository, [NotNull] IMarkupService markupService, [NotNull] IAssetsLocalCache assetsLocalCache) { _assetGeneralSettingsRepository = assetGeneralAvailabilityRepository ?? throw new ArgumentNullException(nameof(assetGeneralAvailabilityRepository)); _assetMerchantSettingsRepository = assetPersonalAvailabilityRepository ?? throw new ArgumentNullException(nameof(assetPersonalAvailabilityRepository)); _markupService = markupService ?? throw new ArgumentNullException(nameof(markupService)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); }
public CalculationService( [NotNull] IAssetsLocalCache assetsLocalCache, [NotNull] LpMarkupSettings lpMarkupSettings, [NotNull] IAssetRatesService assetRatesService, [NotNull] ILogFactory logFactory) { _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _lpMarkupSettings = lpMarkupSettings ?? throw new ArgumentNullException(nameof(lpMarkupSettings)); _log = logFactory.CreateLog(this); _assetRatesService = assetRatesService ?? throw new ArgumentNullException(nameof(assetRatesService)); }
public AssetRatesService( [NotNull] IAssetPairRateRepository assetPairRateRepository, [NotNull] ILykkeMarketProfile marketProfileServiceClient, [NotNull] IAssetsLocalCache assetsLocalCache, [NotNull] IAssetPairSettingsService assetPairSettingsService) { _assetPairRateRepository = assetPairRateRepository ?? throw new ArgumentNullException(nameof(assetPairRateRepository)); _marketProfileServiceClient = marketProfileServiceClient ?? throw new ArgumentNullException(nameof(marketProfileServiceClient)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _assetPairSettingsService = assetPairSettingsService ?? throw new ArgumentNullException(nameof(assetPairSettingsService)); }
public MarkupsController( IMarkupService markupService, ILog log, IMerchantService merchantService, IAssetsLocalCache assetsLocalCache) { _markupService = markupService; _log = log; _merchantService = merchantService; _assetsLocalCache = assetsLocalCache; }
public CalculationService( ILykkeMarketProfile marketProfileServiceClient, IAssetsLocalCache assetsLocalCache, LpMarkupSettings lpMarkupSettings, ILog log) { _marketProfileServiceClient = marketProfileServiceClient ?? throw new ArgumentNullException(nameof(marketProfileServiceClient)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _lpMarkupSettings = lpMarkupSettings ?? throw new ArgumentNullException(nameof(lpMarkupSettings)); _log = log ?? throw new ArgumentNullException(nameof(log)); }
public AssetsController( IAssetsAvailabilityService assetsAvailabilityService, IAssetsLocalCache assetsLocalCache, IMerchantService merchantService, ILog log, ILykkeAssetsResolver lykkeAssetsResolver) { _assetsAvailabilityService = assetsAvailabilityService ?? throw new ArgumentNullException(nameof(assetsAvailabilityService)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _merchantService = merchantService ?? throw new ArgumentNullException(nameof(merchantService)); _log = log ?? throw new ArgumentNullException(nameof(log)); _lykkeAssetsResolver = lykkeAssetsResolver ?? throw new ArgumentNullException(nameof(lykkeAssetsResolver)); }
public MerchantsController( [NotNull] IAssetSettingsService assetSettingsService, [NotNull] ILogFactory logFactory, [NotNull] IMarkupService markupService, [NotNull] IAssetsLocalCache assetsLocalCache, [NotNull] ILykkeAssetsResolver lykkeAssetsResolver) { _assetSettingsService = assetSettingsService ?? throw new ArgumentNullException(nameof(assetSettingsService)); _log = logFactory.CreateLog(this); _markupService = markupService ?? throw new ArgumentNullException(nameof(markupService)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _lykkeAssetsResolver = lykkeAssetsResolver ?? throw new ArgumentNullException(nameof(lykkeAssetsResolver)); }
public MerchantsController( IMerchantService merchantService, IAssetsAvailabilityService assetsAvailabilityService, ILog log, IMarkupService markupService, IAssetsLocalCache assetsLocalCache, ILykkeAssetsResolver lykkeAssetsResolver) { _merchantService = merchantService; _assetsAvailabilityService = assetsAvailabilityService; _log = log; _markupService = markupService; _assetsLocalCache = assetsLocalCache; _lykkeAssetsResolver = lykkeAssetsResolver; }
public EthereumApiClient( [NotNull] IEthereumCoreAPI ethereumServiceClient, [NotNull] EthereumBlockchainSettings ethereumSettings, [NotNull] ILog log, [NotNull] IAssetsLocalCache assetsLocalCache, [NotNull] ILykkeAssetsResolver lykkeAssetsResolver, [NotNull] IAssetsService assetsService) { _ethereumServiceClient = ethereumServiceClient ?? throw new ArgumentNullException(nameof(ethereumServiceClient)); _ethereumSettings = ethereumSettings ?? throw new ArgumentNullException(nameof(ethereumSettings)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _lykkeAssetsResolver = lykkeAssetsResolver ?? throw new ArgumentNullException(nameof(lykkeAssetsResolver)); _assetsService = assetsService ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _log = log.CreateComponentScope(nameof(EthereumApiClient)) ?? throw new ArgumentNullException(nameof(log)); }
public MerchantWalletService( [NotNull] IMerchantWalletRespository merchantWalletRespository, [NotNull] IAssetSettingsService assetSettingsService, [NotNull] IBlockchainClientProvider blockchainClientProvider, [NotNull] ILogFactory logFactory, [NotNull] IAssetsLocalCache assetsLocalCache) { _merchantWalletRespository = merchantWalletRespository ?? throw new ArgumentNullException(nameof(merchantWalletRespository)); _assetSettingsService = assetSettingsService ?? throw new ArgumentNullException(nameof(assetSettingsService)); _blockchainClientProvider = blockchainClientProvider ?? throw new ArgumentNullException(nameof(blockchainClientProvider)); _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); _log = logFactory.CreateLog(this); }
public AssetDisplayIdValueResolver( [NotNull] IAssetsLocalCache assetsLocalCache) { _assetsLocalCache = assetsLocalCache ?? throw new ArgumentNullException(nameof(assetsLocalCache)); }