示例#1
0
 private void Apply(GiftcardCreated @event)
 {
     this.Id          = @event.CardId;
     this.balance     = @event.InitialBalance;
     this.validUntil  = @event.ValidUntil;
     this.isActivated = false;
 }
示例#2
0
 public Task HandleAsync(GiftcardCreated message)
 {
     return(Task.Run(() => this.readStore.CardNumbers.Add(message.CardNumber)));
 }