Class PlacedEmailContent
- Namespace
- MailFathom.Application.EmailContent.Storage
- Assembly
- MailFathom.Application.dll
Says where one raw MIME payload was put, and what was measured over it while it was being put there.
public sealed record PlacedEmailContent : IEquatable<PlacedEmailContent>
- Inheritance
-
PlacedEmailContent
- Implements
- Inherited Members
Remarks
This is what a placement hands back and what a write then records, and it exists because the two happen at different moments. The object write has to run with no database transaction open across it, and every caller has a transaction open by the time it reaches the port — so the payload is placed before the caller opens its unit of work, and this value is what survives the gap between the two.
A caller passes it along and reads nothing out of it. Which backend answered is not a use case's business, which is the port's whole promise, and the four properties here are for the adapter that stages the row.
The payload is mail content and personal data by default. Nothing here reaches a log, and neither the length nor the digest is a permissible stand-in for naming a message in one.
Properties
- Backend
Gets which store holds the payload.
- ByteLength
Gets how many bytes were placed.
- ObjectLocator
Gets the whole key the object was written under, or null when the database holds the payload.
- RawMime
Gets the bytes the row itself must carry, which is empty when the object backend already holds them.
- Sha256Hash
Gets the SHA-256 digest computed over the placed bytes.
Methods
- InDatabase(ReadOnlyMemory<byte>)
Places a payload in the database, which stores nothing until the caller's unit of work commits.
- InObjectStorage(string, long, ReadOnlyMemory<byte>)
Records that a payload was written to the object backend under one key.