Table of Contents

Class UserPortrait

Namespace
MailFathom.Application.Portraits
Assembly
MailFathom.Application.dll

The picture one person is drawn by, as the octets they supplied and the kind those octets are.

public sealed class UserPortrait
Inheritance
UserPortrait
Inherited Members

Remarks

It is composed through Of(ReadOnlyMemory<byte>) and by nothing else, because what makes octets a portrait is that they open as an image this deployment stores — the one invariant here, and the one a constructor taking both halves would let a caller state rather than prove. The kind is therefore never carried beside the octets: it is read from them, so a stored portrait and its media type cannot disagree.

Nothing here resizes, crops, re-encodes, or strips metadata from what was supplied. A portrait is served back as the person uploaded it, which is what makes the bound and the kind check the whole of what stands between an upload and the database.

Properties

Content

Gets the octets the person supplied, unchanged.

Type

Gets what kind of image the portrait is, which is the media type it is served under.

Methods

Of(ReadOnlyMemory<byte>)

Reads octets as a portrait, where they are one.