Example #1
0
        internal void CloseOperation(string operationID, AccountEntry entry = null)
        {
            Trace($"Close pending: {operationID}");

            var cancelled = pendingChanges
                            .FirstOrDefault(c => c.OperationID == operationID);

            if (cancelled != null)
            {
                pendingChanges.Remove(cancelled);

                if (pendingChanges.Count == 0)
                {
                    FirePropertyChanged(nameof(HasPendingChanges));
                }

                FirePropertyChanged(nameof(AmountPending));
                FirePropertyChanged(nameof(PendingChanges));
            }

            AddEntry(entry);
        }
Example #2
0
 public TokenStore this[string accountID]
 => accounts.FirstOrDefault(account => account.AccountID == accountID);