protected internal ContractDataStore(IContractDataStoreCollection <T> collection, IDataContract <T> dataContract, IBlockTree blockTree, IReceiptFinder receiptFinder, ILogManager logManager)
 {
     Collection              = collection == null || collection is ThreadSafeContractDataStoreCollectionDecorator <T>?collection : new ThreadSafeContractDataStoreCollectionDecorator <T>(collection);
     _dataContract           = dataContract ?? throw new ArgumentNullException(nameof(dataContract));
     _receiptFinder          = receiptFinder ?? throw new ArgumentNullException(nameof(receiptFinder));
     _blockTree              = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
     _logger                 = logManager?.GetClassLogger <ContractDataStore <T> >() ?? throw new ArgumentNullException(nameof(logManager));
     blockTree.NewHeadBlock += OnNewHead;
 }
 public ContractDataStoreWithLocalData(
     IContractDataStoreCollection <T> collection,
     IDataContract <T> dataContract,
     IBlockTree blockTree,
     IReceiptFinder receiptFinder,
     ILogManager logManager,
     ILocalDataSource <IEnumerable <T> > localDataSource)
     : base(collection, dataContract ?? new EmptyDataContract <T>(), blockTree, receiptFinder, logManager)
 {
     _localDataSource          = localDataSource ?? throw new ArgumentNullException(nameof(localDataSource));
     _localDataSource.Changed += OnChanged;
     LoadLocalData();
 }
 public ThreadSafeContractDataStoreCollectionDecorator(IContractDataStoreCollection <T> inner)
 {
     _inner = inner ?? throw new ArgumentNullException(nameof(inner));
 }