Method Restore
- Namespace
- MailFathom.Domain.Notifications
- Assembly
- MailFathom.Domain.dll
Restore(NotificationCause?, int?, int?)
Restores the statement a stored row holds, or nothing where the row names no cause.
public static NotificationStatement? Restore(NotificationCause? cause, int? counted, int? outOf)
Parameters
causeNotificationCause?The condition the row names, or null for a row written before a cause was kept.
countedint?How many the cause counts.
outOfint?How many the count is out of.
Returns
- NotificationStatement
The statement, or null where the row names no cause.
Remarks
A row read back is input from outside this process however it got there, so it is validated exactly as a composed one is. What it does not do is hold a restored row to the shape its cause is composed with: a deployment upgraded over rows written by an older build has rows whose cause was inferred from nothing at all, and refusing to draw one would lose a notification rather than a number.
Exceptions
- ArgumentOutOfRangeException
Thrown when
causeis not a declared cause, or when a count is negative.