public void Handle(AccountLockedEvent @event) { var account = AccountInfos.FirstOrDefault(x => x.AccountId == @event.AccountId); if (account != null) account.Lock(); }
public void Handle(AccountLockedEvent e) { Notifications.Add(new Notification(e.AccountId, string.Format("Account locked."))); }
private void UpdateFrom(AccountLockedEvent @event) { _isLocked = true; }