private void AddTransaction(Transaction.Type transactionType, string description) { if (Transactions == null) { Transactions = new List <Transaction>(); } Transactions.Add(new Transaction(transactionType, description)); }
/// <summary> /// Adds the current Transaction to the Transaction History for this account. /// </summary> /// <param name="amt">The amount of money.</param> /// <param name="action">Withdrawl or Deposit.</param> private void RecordTransaction(double amt, Transaction.Type action) { Transaction newTransaction = new Transaction(amt, action); TransactionHistory.Add(newTransaction); }
/// <summary> /// Retrieves all Transactions with the specified type from the given block range. /// Note: If `block_to` is 0, only Block `block_from` will be searched. If both parameters are 0, all Blocks will be searched. /// If both parameters are specified, the search is performed on the blocks [`block_from` - `block_to`] (inclusive). /// </summary> /// <param name="type">Transaction type to retrieve.</param> /// <param name="block_from">Starting block for the transaction search.</param> /// <param name="block_to">Ending block to search.</param> /// <returns>Collection of matching transactions.</returns> public abstract IEnumerable <Transaction> getTransactionsByType(Transaction.Type type, ulong block_from = 0, ulong block_to = 0);