Exemplo n.º 1
0
 public InitalJobAssigner(
     IBlockIndexingJobFactory blockIndexingFactory,
     IBlockRepository blockRepository,
     IErc20BalanceIndexingJobFactory erc20BalanceIndexingJobFactory,
     IErc20ContractIndexingJobFactory erc20ContractIndexingJobFactory,
     IIndexerInstanceSettings indexerInstanceSettings,
     ILog logger,
     IRpcBlockReader rpcBlockReader)
 {
     _blockIndexingFactory            = blockIndexingFactory;
     _blockRepository                 = blockRepository;
     _erc20BalanceIndexingJobFactory  = erc20BalanceIndexingJobFactory;
     _erc20ContractIndexingJobFactory = erc20ContractIndexingJobFactory;
     _indexerInstanceSettings         = indexerInstanceSettings;
     _logger         = logger;
     _rpcBlockReader = rpcBlockReader;
 }
Exemplo n.º 2
0
        public static IServiceCollection RegisterServices(this IServiceCollection collection, IIndexerInstanceSettings indexerInstanceSettings)
        {
            collection.AddSingleton <IBlockIndexingJobFactory, BlockIndexingJobFactory>();
            collection.AddSingleton <IErc20BalanceIndexingJobFactory, Erc20BalanceIndexingJobFactory>();
            collection.AddSingleton <IErc20ContractIndexingJobFactory, Erc20ContractIndexingJobFactory>();
            collection.AddSingleton <IInitalJobAssigner, InitalJobAssigner>();

            collection.AddSingleton(indexerInstanceSettings);

            return(collection);
        }
Exemplo n.º 3
0
 public IndexingRabbitNotifier(IRabbitQueuePublisher rabbitQueuePublisher, IIndexerInstanceSettings indexerInstanceSettings)
 {
     _rabbitQueuePublisher    = rabbitQueuePublisher;
     _indexerInstanceSettings = indexerInstanceSettings;
 }