예제 #1
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.UserId == UserId))
     {
         Contributors.Add(contributor);
         AddDomainEvent(new ProjectJoinedEvent {
             Contributor = contributor
         });
     }
 }
예제 #2
0
        public void AddContributor(ProjectContributor contributor)
        {
            if (!Contributors.Any(v => v.UserId == contributor.UserId))
            {
                Contributors.Add(contributor);

                AddDomainEvent(new ProjectJoinedEvent {
                    Contributor = contributor, Avatar = Avatar, Company = Company, Introduction = Introduction
                });
            }
        }
예제 #3
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!this.Contributors.Any(x => x.UserId == contributor.UserId))
     {
         this.Contributors.Add(contributor);
         this.AddDomainEvent(new ProjectJoinedEvent()
         {
             Contributor = contributor
         });
     }
 }
예제 #4
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (ProjectContributors.Any(x => x.UserId == contributor.UserId))
     {
         return;
     }
     ProjectContributors.Add(contributor);
     AddDomainEvent(new ProjectJoinedEvent()
     {
         ProjectContributor = contributor
     });
 }
예제 #5
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.UserId == UserId))
     {
         Contributors.Add(contributor);
         AddDomainEvent(new ProjectJoinedEvent()
         {
             Company      = this.Company,
             Introduction = this.Introduction,
             Contributor  = contributor
         });
     }
 }
예제 #6
0
 public void AddContributor(ProjectContributor projectContributor)
 {
     if (!this.Contributors.Any(v => v.UserId == projectContributor.UserId))
     {
         this.Contributors.Add(projectContributor);
         this.AddDomainEvent(new ProjectJoinedEvent
         {
             ProjectContributor = projectContributor,
             Company            = this.Company,
             Introduction       = this.Company
         });
     }
 }
예제 #7
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.Id == contributor.Id))
     {
         this.AddDomainEvent(new ProjectJoinedEvent {
             Contributor    = contributor
             , Company      = this.Company
             , Introduction = this.Introduction
             , Avatar       = this.Avatar
         });
         Contributors.Add(contributor);
     }
 }
예제 #8
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (ProjectContributors.Any(x => x.UserId == contributor.UserId))
     {
         return;
     }
     ProjectContributors.Add(contributor);
     AddDomainEvent(new ProjectJoinedEvent
     {
         ProjectContributor = contributor,
         Company            = Company,
         Introduction       = Introduction,
         Avatar             = Avator
     });
 }
예제 #9
0
        /// <summary>
        /// 添加项目贡献者
        /// </summary>
        /// <param name="projectContributor"></param>
        public void AddContributor(ProjectContributor projectContributor)
        {
            //如果不在查看列表中,需添加
            if (!Contributors.Any(b => b.UserId == projectContributor.UserId))
            {
                Contributors.Add(projectContributor);

                //添加 参与项目事件
                AddDomainEvent(new ProjectJoinEvent {
                    Company            = this.Company,
                    Introduction       = this.Introduction,
                    Avatar             = this.Avatar,
                    ProjectContributor = projectContributor
                });
            }
        }