public bool TryGetValue(BlockHeader header, T key, out T value) { GetItemsFromContractAtBlock(header); IDictionaryContractDataStoreCollection <T> collection = ((IDictionaryContractDataStoreCollection <T>)(ContractDataStore.Collection)); return(collection.TryGetValue(key, out value)); }
private static ContractDataStore <T> CreateContractDataStore( IDictionaryContractDataStoreCollection <T> collection, IDataContract <T> dataContract, IBlockTree blockTree, IReceiptFinder receiptFinder, ILogManager logManager) => new ContractDataStore <T>(collection, dataContract, blockTree, receiptFinder, logManager);
public DictionaryContractDataStore( IDictionaryContractDataStoreCollection <T> collection, IDataContract <T> dataContract, IBlockTree blockTree, IReceiptFinder receiptFinder, ILogManager logManager) : this(CreateContractDataStore(collection, dataContract, blockTree, receiptFinder, logManager)) { }
public DictionaryContractDataStore( IDictionaryContractDataStoreCollection <T> collection, IDataContract <T> dataContract, IBlockTree blockTree, IReceiptFinder receiptFinder, ILogManager logManager, ILocalDataSource <IEnumerable <T> > localDataSource) : this(localDataSource == null ? CreateContractDataStore(collection, dataContract, blockTree, receiptFinder, logManager) : CreateContractDataStoreWithLocalData(collection, dataContract, blockTree, receiptFinder, logManager, localDataSource)) { }
private static ContractDataStoreWithLocalData <T> CreateContractDataStoreWithLocalData( IDictionaryContractDataStoreCollection <T> collection, IDataContract <T> dataContract, IBlockTree blockTree, IReceiptFinder receiptFinder, ILogManager logManager, ILocalDataSource <IEnumerable <T> > localDataSource) => new ContractDataStoreWithLocalData <T>( collection, dataContract ?? new EmptyDataContract <T>(), blockTree, receiptFinder, logManager, localDataSource);