示例#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);
        }
示例#2
0
 public TokenStore this[string accountID]
 => accounts.FirstOrDefault(account => account.AccountID == accountID);