예제 #1
0
 private void Handle(CashTransferCreatedEvent evnt)
 {
     _id       = evnt.AggregateRootId;
     _nunber   = evnt.Number;
     _info     = evnt.Info;
     _type     = evnt.Type;
     _status   = evnt.Status;
     _walletId = evnt.WalletId;
 }
예제 #2
0
        private CashTransferStatus _status; //状态


        public CashTransfer(Guid id, Guid walletId, string number, CashTransferInfo info, CashTransferType type, CashTransferStatus status)
            : base(id)
        {
            id.CheckNotEmpty(nameof(id));
            walletId.CheckNotEmpty(nameof(walletId));
            info.CheckNotNull(nameof(info));

            ApplyEvent(new CashTransferCreatedEvent(walletId, number, info, type, status));
        }