public RebroadcasterHostedService(RepositoryProvider repositories, BitcoinDWaiters waiters, EventAggregator eventAggregator) { _Repositories = repositories; _Waiters = waiters; EventAggregator = eventAggregator; _BroadcastedTransactionsByCryptoCode = repositories.GetAll() .Select(r => new RebroadcastedTransactions() { Network = r.Network }).ToDictionary(t => t.Network); }
public RebroadcasterHostedService( NBXplorerNetworkProvider networkProvider, ExplorerConfiguration configuration, RepositoryProvider repositories, BitcoinDWaiters waiters, EventAggregator eventAggregator) { _Repositories = repositories; _Waiters = waiters; EventAggregator = eventAggregator; _BroadcastedTransactionsByCryptoCode = configuration.ChainConfigurations .Select(r => new RebroadcastedTransactions() { Network = networkProvider.GetFromCryptoCode(r.CryptoCode) }).ToDictionary(t => t.Network); }