Class ConfigurationWriteResult
- Namespace
- MailFathom.Application.Configuration
- Assembly
- MailFathom.Application.dll
What a configuration write did: the version it committed, or why the deployment's settings are unchanged.
public sealed record ConfigurationWriteResult : IEquatable<ConfigurationWriteResult>
- Inheritance
-
ConfigurationWriteResult
- Implements
- Inherited Members
Remarks
A refusal is a result rather than an exception because every one of them is something the administrator who asked for the write acts on directly — a setting MailFathom persists nowhere, a value the configuration will not bind, a document somebody else moved on, a secret written as material. Each is an expected outcome of an edit rather than a failure of the machinery underneath it, and each carries the code a surface reports and the sentences an operator reads.
Version is meaningful either way, and deliberately so: it is the version now in force, so a refused write says what the deployment is running on and a committed one says what it moved to. A caller refused for a superseded version re-reads that version and decides again against it. The one refusal that carries the version the caller stated rather than one read from the row is a change refused before the document was read at all — a path persisted nowhere, or secret material — because nothing about either depends on what the row holds and reading it to answer would be a query MailFathom made to report a number the caller already supplied.
The messages quote what the caller themselves wrote, which is why they travel back to that caller and stay out of the log. A validator names the setting it refused and the value it was given, and the operator holding the failed edit is the one person who already has both.
Properties
- IsCommitted
Gets whether the write committed, in which case Version is the version it produced.
- Refusal
Gets the code naming why the write was refused, which is the unspecified default when it committed.
- RefusalMessages
Gets one sentence per reason the write was refused, empty when it committed.
- Version
Gets the version of the persisted configuration now in force.
Methods
- Committed(long)
Reports a write that committed.
- Refused(MailFathomErrorCode, long, IReadOnlyList<string>)
Reports a write that changed nothing.