Class NotificationTarget
- Namespace
- MailFathom.Domain.Notifications
- Assembly
- MailFathom.Domain.dll
Where opening a notification leads.
public sealed record NotificationTarget : IEquatable<NotificationTarget>
- Inheritance
-
NotificationTarget
- Implements
- Inherited Members
Remarks
The five shapes are closed and each is reached through its own factory, so a target can never half exist — a message target with no message, or a screen target that also names one. Which of the five a producer chose is what a reader switches on, and NotificationTargetKind is that answer without unwrapping anything.
A message target is the one that ties a notification to mail, and it is what makes a notification erasable with the message it describes: the record inherits the message's deletion rather than being swept for separately, so nothing can leave a row pointing at mail that is gone.
Properties
- CalendarEvent
Gets the calendar event the notification leads to, and null for every other shape.
- Kind
Gets which of the five shapes this target is.
- Nothing
Gets the target of a notification that has nothing to open.
- PersonalTask
Gets the task the notification leads to, and null for every other shape.
Methods
- ToCalendarEvent(CalendarEventId)
Creates a target that leads to one event of the person's own calendar.
- ToMessage(StoredEmailId)
Creates a target that leads to one stored message.
- ToPersonalTask(PersonalTaskId)
Creates a target that leads to one task of the person's own list.
- ToScreen(NotificationScreen)
Creates a target that leads to a screen rather than to a record.