public NotificationService(IOptionsMonitor <AppSettings> options, ILogger <NotificationService> logger, IEventBus eventBus, INotificationsHandler notificationsHandler, ITxRepository txRepository) : base(logger, eventBus) { this.notificationsHandler = notificationsHandler ?? throw new ArgumentNullException(nameof(notificationsHandler)); this.txRepository = txRepository ?? throw new ArgumentNullException(nameof(txRepository)); notificationSettings = options.CurrentValue.Notification; }
public StartupChecker(INodeRepository nodeRepository, INodes nodes, IRpcClientFactory rpcClientFactory, IMinerId minerId, IBlockParser blockParser, IDbManager dbManager, INotificationsHandler notificationsHandler, ILogger <StartupChecker> logger) { this.rpcClientFactory = rpcClientFactory ?? throw new ArgumentNullException(nameof(rpcClientFactory)); this.nodeRepository = nodeRepository ?? throw new ArgumentNullException(nameof(nodeRepository)); this.nodes = nodes ?? throw new ArgumentNullException(nameof(nodes)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.blockParser = blockParser ?? throw new ArgumentNullException(nameof(blockParser)); this.dbManager = dbManager ?? throw new ArgumentNullException(nameof(dbManager)); this.minerId = minerId ?? throw new ArgumentNullException(nameof(nodeRepository)); this.notificationsHandler = notificationsHandler ?? throw new ArgumentNullException(nameof(notificationsHandler)); }
public StartupChecker(INodeRepository nodeRepository, IRpcClientFactory rpcClientFactory, IMinerId minerId, IBlockParser blockParser, ICreateDB createDB, INotificationsHandler notificationsHandler, ILogger <StartupChecker> logger, IConfiguration configuration) { this.rpcClientFactory = rpcClientFactory ?? throw new ArgumentNullException(nameof(rpcClientFactory)); this.nodeRepository = nodeRepository ?? throw new ArgumentNullException(nameof(nodeRepository)); this.logger = logger ?? throw new ArgumentException(nameof(logger)); this.blockParser = blockParser ?? throw new ArgumentException(nameof(blockParser)); this.createDB = createDB ?? throw new ArgumentException(nameof(createDB)); this.minerId = minerId ?? throw new ArgumentException(nameof(nodeRepository)); this.notificationsHandler = notificationsHandler ?? throw new ArgumentException(nameof(notificationsHandler)); rdbms = RDBMS.Postgres; }