public void ChangeMainAttributes( string title, MeetingTerm term, string description, MeetingLocation location, MeetingLimits meetingLimits, Term rsvpTerm, MoneyValue eventFee, MemberId modifyUserId) { base.CheckRule(new AttendeesLimitCannotBeChangedToSmallerThanActiveAttendeesRule( meetingLimits, this.GetAllActiveAttendeesWithGuestsNumber())); _title = title; _term = term; _description = description; _location = location; _meetingLimits = meetingLimits; this.SetRsvpTerm(rsvpTerm, _term); _eventFee = eventFee; _changeDate = SystemClock.Now; _changeMemberId = modifyUserId; this.AddDomainEvent(new MeetingMainAttributesChangedDomainEvent(this.Id)); }
internal static Meeting CreateNew(MeetingGroupId meetingGroupId, string title, MeetingTerm term, string description, MeetingLocation location, MeetingLimits meetingLimits, Term rsvpTerm, MoneyValue eventFee, List <MemberId> hostsMembersIds, MemberId creatorId) { return(new Meeting(meetingGroupId, title, term, description, location, meetingLimits, rsvpTerm, eventFee, hostsMembersIds, creatorId)); }
private Meeting( MeetingGroupId meetingGroupId, string title, MeetingTerm term, string description, MeetingLocation location, MeetingLimits meetingLimits, Term rsvpTerm, MoneyValue eventFee, List <MemberId> hostsMembersIds, MemberId creatorId) { Id = new MeetingId(Guid.NewGuid()); _meetingGroupId = meetingGroupId; _title = title; _term = term; _description = description; _location = location; _meetingLimits = meetingLimits; this.SetRsvpTerm(rsvpTerm, _term); _eventFee = eventFee; _creatorId = creatorId; _createDate = SystemClock.Now; _attendees = new List <MeetingAttendee>(); _notAttendees = new List <MeetingNotAttendee>(); _waitlistMembers = new List <MeetingWaitlistMember>(); this.AddDomainEvent(new MeetingCreatedDomainEvent(this.Id)); var rsvpDate = SystemClock.Now; if (hostsMembersIds.Any()) { foreach (var hostMemberId in hostsMembersIds) { _attendees.Add(MeetingAttendee.CreateNew(this.Id, hostMemberId, rsvpDate, MeetingAttendeeRole.Host, 0, MoneyValue.Undefined)); } } else { _attendees.Add(MeetingAttendee.CreateNew(this.Id, creatorId, rsvpDate, MeetingAttendeeRole.Host, 0, MoneyValue.Undefined)); } }