/// <summary> /// Constructor /// </summary> /// <param name="database">The database to connect to.</param> /// <param name="pendingTransactionBuilder">Builder of <see cref="PendingTransaction" /> objects.</param> /// <param name="networkTransactionReceiptDataTableBuilder">Builder of pending transactions data tables.</param> /// <param name="pendingTransactionsDataTableBuilder">Builder of state transactions data tables.</param> public PendingTransactionDataManager(ISqlServerDatabase database, IObjectCollectionBuilder <PendingTransactionEntity, PendingTransaction> pendingTransactionBuilder, ISqlDataTableBuilder <NetworkTransactionReceiptEntity> networkTransactionReceiptDataTableBuilder, ISqlDataTableBuilder <PendingTransaction> pendingTransactionsDataTableBuilder) { this._networkTransactionReceiptDataTableBuilder = networkTransactionReceiptDataTableBuilder ?? throw new ArgumentNullException(nameof(networkTransactionReceiptDataTableBuilder)); this._pendingTransactionsDataTableBuilder = pendingTransactionsDataTableBuilder ?? throw new ArgumentNullException(nameof(pendingTransactionsDataTableBuilder)); this._database = database ?? throw new ArgumentNullException(nameof(database)); this._pendingTransactionBuilder = pendingTransactionBuilder ?? throw new ArgumentNullException(nameof(pendingTransactionBuilder)); }
/// <summary> /// Constructor /// </summary> /// <param name="database">The database to connect to.</param> /// <param name="gameRoundBuilder">Game round builder.</param> /// <param name="blockNumberBuilder">Block number builder.</param> /// <param name="winAmountTableBuilder">Win amount table builder</param> /// <param name="gameHistoryBuilder">Game history builder.</param> /// <param name="transactionHashBuilder"></param> public GameRoundDataManager(ISqlServerDatabase database, IObjectCollectionBuilder <GameRoundEntity, GameRound> gameRoundBuilder, IObjectBuilder <BlockNumberEntity, BlockNumber> blockNumberBuilder, ISqlDataTableBuilder <WinAmountEntity> winAmountTableBuilder, IObjectCollectionBuilder <GameHistoryEntity, GameHistory> gameHistoryBuilder, IObjectCollectionBuilder <TransactionHashEntity, TransactionHash> transactionHashBuilder) { this._database = database ?? throw new ArgumentNullException(nameof(database)); this._gameRoundBuilder = gameRoundBuilder ?? throw new ArgumentNullException(nameof(gameRoundBuilder)); this._blockNumberBuilder = blockNumberBuilder ?? throw new ArgumentNullException(nameof(blockNumberBuilder)); this._winAmountTableBuilder = winAmountTableBuilder ?? throw new ArgumentNullException(nameof(winAmountTableBuilder)); this._gameHistoryBuilder = gameHistoryBuilder ?? throw new ArgumentNullException(nameof(gameHistoryBuilder)); this._transactionHashBuilder = transactionHashBuilder ?? throw new ArgumentNullException(nameof(transactionHashBuilder)); }
/// <summary> /// Constructor. /// </summary> /// <param name="database">The database to read from.</param> /// <param name="transactionHashDataTableBuilder">Transaction hash table builder.</param> /// <param name="contractsDataTableBuilder">Contract address table builder.</param> /// <param name="eventRiskyTransactionsDataTableBuilder">Event Risky Transactions Data Table Builder.</param> /// <param name="eventRiskyTransactionsBuilder">Builder of <see cref="AwaitingConfirmationsTransaction" /> from <see cref="AwaitingConfirmationsTransactionEntity" />.</param> /// <param name="eventIndexBuilder">An Event index builder</param> /// <param name="eventCheckpointBuilder">Builder of <see cref="EventContractCheckpoint" /> from <see cref="EventContractCheckpointEntity" />.</param> /// <param name="transactionHashBuilder">Builder of <see cref="TransactionHash" /> from, <see cref="EventTransactionHashEntity" /> objects.</param> public EventDataManager(ISqlServerDatabase database, ISqlDataTableBuilder <EventTransactionEntity> transactionHashDataTableBuilder, ISqlDataTableBuilder <ContractAddressEntity> contractsDataTableBuilder, ISqlDataTableBuilder <AwaitingConfirmationsTransactionDataTableEntity> eventRiskyTransactionsDataTableBuilder, IObjectCollectionBuilder <AwaitingConfirmationsTransactionEntity, AwaitingConfirmationsTransaction> eventRiskyTransactionsBuilder, ISqlDataTableBuilder <EventIndexEntity> eventIndexBuilder, IObjectCollectionBuilder <EventContractCheckpointEntity, EventContractCheckpoint> eventCheckpointBuilder, IObjectCollectionBuilder <EventTransactionHashEntity, TransactionHash> transactionHashBuilder) { this._database = database ?? throw new ArgumentNullException(nameof(database)); this._transactionHashDataTableBuilder = transactionHashDataTableBuilder ?? throw new ArgumentNullException(nameof(transactionHashDataTableBuilder)); this._contractsDataTableBuilder = contractsDataTableBuilder ?? throw new ArgumentNullException(nameof(contractsDataTableBuilder)); this._eventRiskyTransactionsDataTableBuilder = eventRiskyTransactionsDataTableBuilder ?? throw new ArgumentNullException(nameof(eventRiskyTransactionsDataTableBuilder)); this._eventRiskyTransactionsBuilder = eventRiskyTransactionsBuilder ?? throw new ArgumentNullException(nameof(eventRiskyTransactionsBuilder)); this._eventIndexBuilder = eventIndexBuilder ?? throw new ArgumentNullException(nameof(eventIndexBuilder)); this._eventCheckpointBuilder = eventCheckpointBuilder ?? throw new ArgumentNullException(nameof(eventCheckpointBuilder)); this._transactionHashBuilder = transactionHashBuilder ?? throw new ArgumentNullException(nameof(transactionHashBuilder)); this._machineName = Environment.MachineName; }