コード例 #1
0
        public void Handle(TransferStarted e)
        {
            if (e.Amount > 10000)
            {
                var from  = _querySearch.SelectAccountSummary(e.FromAccount);
                var to    = _querySearch.SelectAccountSummary(e.ToAccount);
                var alert = $"Money transfer started: {e.Amount:c2} from {from.AccountCode} to {to.AccountCode}";

                // var smtp = new SmtpClient();
                // smtp.Send("*****@*****.**", "*****@*****.**", "Large Money Transfer", alert);
            }
        }
コード例 #2
0
        public void Handle(AccountClosed c)
        {
            var account = _search.SelectAccountSummary(c.AggregateIdentifier);

            _store.UpdateAccountStatus(account.AccountIdentifier, "Closed");
        }