public CalendarEntryRelocated(TenantId tenantId, CalendarId calendarId, CalendarEntryId calendarEntryId, string location) { this.TenantId = tenantId; this.CalendarId = calendarId; this.CalendarEntryId = calendarEntryId; this.Location = location; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarUnhared(TenantId tenantId, CalendarId calendarId, string name, CalendarSharer unsharedWith) { this.TenantId = tenantId; this.CalendarId = calendarId; this.Name = name; this.UnsharedWith = unsharedWith; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarRenamed(TenantId tenantId, CalendarId calendarId, string name, string description) { this.TenantId = tenantId; this.CalendarId = calendarId; this.Name = name; this.Description = description; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarEntryDescriptionChanged(TenantId tenantId, CalendarId calendarId, CalendarEntryId calendarEntryId, string description) { this.TenantId = tenantId; this.CalendarId = calendarId; this.CalendarEntryId = calendarEntryId; this.Description = description; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarEntryParticipantUninvited(TenantId tenantId, CalendarId calendarId, CalendarEntryId calendarEntryId, Participant participant) { this.TenantId = tenantId; this.CalendarId = calendarId; this.CalendarEntryId = calendarEntryId; this.Participant = participant; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public Calendar(TenantId tenantId, CalendarId calendarId, string name, string description, Owner owner, IEnumerable<CalendarSharer> sharedWith = null) { AssertionConcern.NotNull(tenantId, "The tenant must be provided."); AssertionConcern.NotNull(calendarId, "The calendar id must be provided."); AssertionConcern.NotEmpty(name, "The name must be provided."); AssertionConcern.NotEmpty(description, "The description must be provided."); AssertionConcern.NotNull(owner, "The owner must be provided."); this.Apply(new CalendarCreated(tenantId, calendarId, name, description, owner, sharedWith)); }
public CalendarCreated(TenantId tenantId, CalendarId calendarId, string name, string description, Owner owner, IEnumerable<CalendarSharer> sharedWith) { this.TenantId = tenantId; this.CalendarId = calendarId; this.Name = name; this.Description = description; this.Owner = owner; this.SharedWith = sharedWith; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarEntryRescheduled(TenantId tenantId, CalendarId calendarId, CalendarEntryId calendarEntryId, DateRange timeSpan, Repetition repetition, Alarm alarm) { this.TenantId = tenantId; this.CalendarId = calendarId; this.CalendarEntryId = calendarEntryId; this.TimeSpan = timeSpan; this.Repetition = repetition; this.Alarm = alarm; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarEntryScheduled(TenantId tenantId, CalendarId calendarId, CalendarEntryId calendarEntryId, string description, string location, Owner owner, DateRange timeSpan, Repetition repetition, Alarm alarm, IEnumerable<Participant> invitees) { this.TenantId = tenantId; this.CalendarId = calendarId; this.CalendarEntryId = calendarEntryId; this.Description = description; this.Location = location; this.Owner = owner; this.TimeSpan = timeSpan; this.Repetition = repetition; this.Alarm = alarm; this.Invitees = invitees; this.EventVersion = 1; this.OccurredOn = DateTime.Now; }
public CalendarEntry(TenantId tenantId, CalendarId calendarId, CalendarEntryId calendarEntryId, string description, string location, Owner owner, DateRange timeSpan, Repetition repetition, Alarm alarm, IEnumerable<Participant> invitees = null) { AssertionConcern.NotNull(tenantId, "The tenant must be provided."); AssertionConcern.NotNull(calendarId, "The calendar id must be provided."); AssertionConcern.NotNull(calendarEntryId, "The calendar entry id must be provided."); AssertionConcern.NotEmpty(description, "The description must be provided."); AssertionConcern.NotEmpty(location, "The location must be provided."); AssertionConcern.NotNull(owner, "The owner must be provided."); AssertionConcern.NotNull(timeSpan, "The time span must be provided."); AssertionConcern.NotNull(repetition, "The repetition must be provided."); AssertionConcern.NotNull(alarm, "The alarm must be provided."); if(repetition.Repeats==RepeatType.DoesNotRepeat) { repetition = Repetition.DoesNotRepeat(timeSpan.Ends); } AssertTimeSpans(repetition, timeSpan); this.Apply(new CalendarEntryScheduled(tenantId, calendarId, calendarEntryId, description, location, owner, timeSpan, repetition, alarm, invitees)); }
private void When(CalendarCreated e) { this._tenantId = e.TenantId; this._calendarId = e.CalendarId; this._name = e.Name; this._description = e.Description; this._sharedWith = new HashSet<CalendarSharer>(e.SharedWith ?? Enumerable.Empty<CalendarSharer>()); }
private void When(CalendarEntryScheduled e) { this._tenantId = e.TenantId; this._calendarId = e.CalendarId; this._calendarEntryId = e.CalendarEntryId; this._description = e.Description; this._location = e.Location; this._owner = e.Owner; this._timeSpan = e.TimeSpan; this._repetition = e.Repetition; this._alarm = e.Alarm; this._invitees = new HashSet<Participant>(e.Invitees ?? Enumerable.Empty<Participant>()); }