public void Apply(CredentialStoredEvent aggregateEvent)
 {
     this.CredentialId = aggregateEvent.CredentialId;
     this.MemberId     = aggregateEvent.MemberId;
     this.Username     = aggregateEvent.Username;
     this.Password     = aggregateEvent.Password;
 }
Esempio n. 2
0
 private bool Execute(StoreCredential cmd)
 {
     if (!string.IsNullOrEmpty(cmd.Username) &&
         !string.IsNullOrEmpty(cmd.Password))
     {
         var @event = new CredentialStoredEvent(cmd.CredentialId, cmd.MemberId, new Username(cmd.Username), new Password(cmd.Password));
         Emit(@event);
         return(true);
     }
     return(false);
 }