예제 #1
0
 public UserAccountView(UserAccountCreatedEvent e, int membershipProviderId)
 {
     Id = e.Id.Literal;
     MembershipProviderId = membershipProviderId;
     UserName             = e.UserName;
     UserNameLowercase    = UserName.ToLower();
     EMail          = e.EMail.ToString();
     EMailLowercase = EMail.ToLower();
 }
예제 #2
0
        public UserAccountView BuildUserAccountView(string userName = null, string email = null)
        {
            UserAccountCreatedEvent e = new UserAccountCreatedEvent(new UserAccountId(), "John", new EMail("*****@*****.**"));
            UserAccountView         u = new UserAccountView(e, 1);

            UserAccountViewProvider.Add(u);
            RegisterInstance(u);
            return(u);
        }
예제 #3
0
        private void HandleUserAccountCreatedEvent(UserAccountCreatedEvent e)
        {
            this.UserName     = e.UserName;
            this.Password     = e.Password;
            this.DisplayName  = e.DisplayName;
            this.Email        = e.Email;
            this.ContactPhone = e.ContactPhone;
            Address address = new Address
            {
                Country = e.ContactAddressCountry,
                State   = e.ContactAddressState,
                City    = e.ContactAddressCity,
                Street  = e.ContactAddressStreet,
                Zip     = e.ContactAddressZip
            };

            this.ContactAddress = address;
        }
예제 #4
0
 public void Apply(UserAccountCreatedEvent aggregateEvent)
 {
     Name = aggregateEvent.Name;
 }
예제 #5
0
 public void RestoreFrom(UserAccountCreatedEvent e)
 {
     Id       = e.Id;
     UserName = e.UserName;
     EMail    = e.EMail;
 }
예제 #6
0
 public void Apply(UserAccountCreatedEvent aggregateEvent)
 {
     State.Apply(aggregateEvent);
 }