/// <summary> /// Constructor. /// </summary> /// <param name="ethereumNetworkConfigurationManager"></param> /// <param name="ethereumBlockStatus"></param> /// <param name="latestBlockRetriever">Retriever of the latest blocks.</param> /// <param name="dateTimeSource">Source of time</param> /// <param name="endGameBettingService">Game betting ending.</param> /// <param name="logger">Logging</param> public StopBettingBackgroundService(IEthereumNetworkConfigurationManager ethereumNetworkConfigurationManager, IEthereumBlockStatus ethereumBlockStatus, IEthereumLatestBlockRetriever latestBlockRetriever, IDateTimeSource dateTimeSource, IEndGameBettingService endGameBettingService, ILogger <StopBettingBackgroundService> logger) : base(ethereumNetworkConfigurationManager: ethereumNetworkConfigurationManager, ethereumBlockStatus: ethereumBlockStatus, latestBlockRetriever: latestBlockRetriever, processUnchangedBlocks: false, dateTimeSource: dateTimeSource, sweepInterval: TimeSpan.FromSeconds(0.5), blockTriggeredService: new BackgroundService(endGameBettingService), logger: logger) { }
public BackgroundService(IEndGameBettingService endGameBettingService) { this._endGameBettingService = endGameBettingService ?? throw new ArgumentNullException(nameof(endGameBettingService)); }