Пример #1
0
        public void AddMember(Guid memberId)
        {
            if(_members.Contains(memberId)) throw new DomainException(string.Format("Already contains member with id {0}.", memberId));

            var e = new MemberAddedToProject(memberId);
            ApplyEvent(e);
        }
Пример #2
0
 private void OnMemberAdded(MemberAddedToProject e)
 {
     _members.Add(e.MemberId);
 }