Esempio n. 1
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.UserId == UserId))
     {
         Contributors.Add(contributor);
         AddDomainEvent(new ProjectJoinedEvent {
             Contributor = contributor
         });
     }
 }
Esempio n. 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
                });
            }
        }
Esempio n. 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
         });
     }
 }
Esempio n. 4
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (ProjectContributors.Any(x => x.UserId == contributor.UserId))
     {
         return;
     }
     ProjectContributors.Add(contributor);
     AddDomainEvent(new ProjectJoinedEvent()
     {
         ProjectContributor = contributor
     });
 }
Esempio n. 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
         });
     }
 }
Esempio n. 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
         });
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 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
     });
 }
Esempio n. 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
                });
            }
        }