Table of Contents

Method AmendedWith

Namespace
MailFathom.Domain.Calendar
Assembly
MailFathom.Domain.dll

AmendedWith(CalendarEventTitle, DateTimeOffset, DateTimeOffset?, bool, IReadOnlyCollection<Reminder>, DateTimeOffset)

Produces this event with what an amendment replaced, keeping its identity, its origin, and where it came from.

public CalendarEvent AmendedWith(CalendarEventTitle title, DateTimeOffset start, DateTimeOffset? end, bool isAllDay, IReadOnlyCollection<Reminder> reminders, DateTimeOffset amendedAt)

Parameters

title CalendarEventTitle

What the event is called after the amendment.

start DateTimeOffset

When it begins after the amendment.

end DateTimeOffset?

When it ends after the amendment, or null to hold no end.

isAllDay bool

Whether it is stated as a day rather than as a clock time afterwards.

reminders IReadOnlyCollection<Reminder>

The leads it is to be announced at afterwards, or empty to announce nothing.

amendedAt DateTimeOffset

When the amendment happened.

Returns

CalendarEvent

The amended event.

Remarks

An amendment states the event as it is to stand rather than the difference from the one held, which is what keeps retitling it, moving it, dropping its end, and changing what announces it one operation instead of four that each pass through a shape the invariants above refuse. The reminders are part of that record for the same reason: a person turning the last one off is stating an event that announces nothing rather than omitting a field.

Exceptions

ArgumentNullException

Thrown when reminders is null.

ArgumentOutOfRangeException

Thrown when end is not after start, or when more than MaximumCount reminders are supplied.

ArgumentException

Thrown when title is the default of its type, or when one lead is supplied twice.