Table of Contents

Class ClientThemeChoiceJsonConverter

Namespace
MailFathom.Application.Preferences
Assembly
MailFathom.Application.dll

Serializes ClientThemeChoice as its published name, and refuses anything else.

public sealed class ClientThemeChoiceJsonConverter : JsonConverter<ClientThemeChoice>
Inheritance
ClientThemeChoiceJsonConverter
Inherited Members

Remarks

The type carries this converter through JsonConverterAttribute, so the client endpoint and the persisted document are read and written the same way without either registering it. Refusing an undeclared name is what keeps the stored set closed: a write naming a theme this build does not publish fails to bind and is answered as a refused request rather than committed.

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type ClientThemeChoice.

ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads a dictionary key from a JSON property name.

Write(Utf8JsonWriter, ClientThemeChoice, JsonSerializerOptions)

Writes a specified value as JSON.

WriteAsPropertyName(Utf8JsonWriter, ClientThemeChoice, JsonSerializerOptions)

Writes a dictionary key as a JSON property name.