public void Handle(AccountLockedEvent @event)
        {
            var account = AccountInfos.FirstOrDefault(x => x.AccountId == @event.AccountId);

            if (account != null)
                account.Lock();
        }
Пример #2
0
 private void UpdateFrom(AccountLockedEvent @event)
 {
     _isLocked = true;
 }
 public void Handle(AccountLockedEvent e)
 {
     Notifications.Add(new Notification(e.AccountId, string.Format("Account locked.")));
 }