private static Func <ITransaction, bool> TransactionMetadataFilter(TransactionMetadata metadata) { return(transaction => transaction.Metadata.Any() && metadata.Any() && metadata.All( transactionMetadata => transaction.Metadata.Contains(new KeyValuePair <string, string>(transactionMetadata.Key, transactionMetadata.Value)))); }
public ITransaction FindTransaction(TransactionMetadata metadata) { if (!this.TransactionExists(metadata)) { throw new InvalidOperationException(nameof(FindTransaction)); } return(Transactions.Single(TransactionMetadataFilter(metadata))); }
public ITransaction FindTransaction(TransactionMetadata metadata) { return(_account.FindTransaction(metadata)); }
public bool TransactionExists(TransactionMetadata metadata) { return(Transactions.Any(TransactionMetadataFilter(metadata))); }
public bool TransactionExists(TransactionMetadata metadata) { return(_account.TransactionExists(metadata)); }