public static IQueueConsumersRegistrant AddTransactionMonitoringQueueConsumer( this IQueueConsumersRegistrant registrant) { registrant .Builder .Register ( ctx => new DefaultTransactionMonitoringQueueConsumer ( ctx.Resolve <ILogFactory>(), ctx.Resolve <ITransactionMonitoringService>(), registrant.TransactionMonitoringMaxDegreeOfParallelism ) ) .As <ITransactionMonitoringQueueConsumer>() .As <IStartable>() .As <IStopable>() .IfNotRegistered(typeof(ITransactionMonitoringQueueConsumer)) .SingleInstance(); return(registrant); }
public static IQueueConsumersRegistrant AddBlockchainIndexationQueueConsumer( this IQueueConsumersRegistrant registrant) { registrant .Builder .Register ( ctx => new DefaultBlockchainIndexationQueueConsumer ( ctx.Resolve <IBlockchainIndexingService>(), ctx.Resolve <ILogFactory>(), registrant.BlockchainIndexationMaxDegreeOfParallelism ) ) .As <IBlockchainIndexationQueueConsumer>() .As <IStartable>() .As <IStopable>() .IfNotRegistered(typeof(IBlockchainIndexationQueueConsumer)) .SingleInstance(); return(registrant); }