コード例 #1
0
 public IUserVisitor Visit(EmailChanged @event)
 {
     var origUser = this.users.Single(u => u.Id == @event.UserId);
     var newUser = new User(
         origUser.Id,
         origUser.Name,
         origUser.Password,
         @event.NewEmail,
         false);
     var newUsers = this.users
         .Where(u => u.Id != newUser.Id)
         .Concat(new[] { newUser });
     return new UserVisitor(newUsers);
 }
コード例 #2
0
ファイル: UserVisitor.cs プロジェクト: wrumsby/AtomEventStore
        public IUserVisitor Visit(EmailChanged @event)
        {
            var origUser = this.users.Single(u => u.Id == @event.UserId);
            var newUser  = new User(
                origUser.Id,
                origUser.Name,
                origUser.Password,
                @event.NewEmail,
                false);
            var newUsers = this.users
                           .Where(u => u.Id != newUser.Id)
                           .Concat(new[] { newUser });

            return(new UserVisitor(newUsers));
        }