Class OutgoingEmailRequester
- Namespace
- MailFathom.Domain.Delivery
- Assembly
- MailFathom.Domain.dll
Names the authored act that asked for a message to be sent, in a form two requests can be compared by.
public sealed record OutgoingEmailRequester : IEquatable<OutgoingEmailRequester>
- Inheritance
-
OutgoingEmailRequester
- Implements
- Inherited Members
Remarks
This is the half of an outgoing email's idempotency identity that says who asked; the sending account is the other. It has to answer one question: would asking again be the same request or a new one. A rule answers it with its own name and the revision it was evaluated at, so re-evaluating an unchanged rule sends nothing a second time and changing the rule asks afresh. Somebody present answers it with a key of their own, so a retried command is the same request and a second command is a second one. A recurring send answers it with the declaration and the occasion, so every Monday is a request of its own and one Monday reached twice is not.
A duplicated delivery cannot be withdrawn, so the key is what the caller is answerable for rather than something derived here: a caller that generates a fresh key per attempt has asked twice, and this type cannot tell that apart from two genuine sends. What it does guarantee is that one key sends once.
Only MailFathom's own configured names and a caller's own key reach here. A rule name is chosen by the operator and a command key by whoever invoked it; no recipient, subject, or other mail content is part of a requester, which is what keeps the identity of an outgoing record free of the message it is about.
Fields
- MaximumIdentityLength
The greatest length an identity may have, which bounds the column it is stored in and the index over it.
Properties
- Identity
Gets the identity that decides whether asking again is the same request.
- Origin
Gets what kind of authored act asked.
Methods
- Command(string)
Names one act somebody asked for, by the key they supplied for it.
- Create(OutgoingEmailOrigin, string)
Restores a requester from the origin and identity a record holds.
- Draft(MailDraftId)
Names the promotion of one draft, which is the draft rather than a key whoever asked supplied.
- Rule(string, string, StoredEmailId)
Names a rule together with the revision of it that asked, and the email it acted on.
- Schedule(RecurringSendId, DateTimeOffset)
Names one occasion of a recurring send the owner declared, which is the declaration and the occasion together.
- ToString()
Returns a string that represents the current object.