Table of Contents

Method ReadBackAsync

Namespace
MailFathom.Application.EmailContent.Storage
Assembly
MailFathom.Application.dll

ReadBackAsync(string, long, CancellationToken)

Reads back the object one key names, so what was written can be checked against what a row records.

Task<ReadOnlyMemory<byte>?> ReadBackAsync(string objectLocator, long maximumByteLength, CancellationToken cancellationToken)

Parameters

objectLocator string

The whole key, exactly as the placement produced it.

maximumByteLength long

The length the row records, past which the endpoint's answer stops being read.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<ReadOnlyMemory<byte>?>

The bytes, or null when the endpoint holds no object under that key.

Remarks

An absent object is answered rather than raised, because the two are different findings: an endpoint that cannot answer says to try the same payload again later, and an endpoint that answers with nothing says this payload must not be repointed at all.

The ceiling is what keeps a remote answer from deciding how much this process holds. A caller states the length it expects, the read stops one byte past it, and an endpoint answering with more is met as a payload that disagrees with its row rather than as a buffer grown to fit whatever arrived.

Exceptions

ArgumentOutOfRangeException

Thrown when maximumByteLength is not positive.

MailFathomException

Thrown when the endpoint could not answer.