Table of Contents

Interface ICalendarSerializer

Namespace
Quartz.Serialization.SystemTextJson.Calendars
Assembly
Quartz.dll

How one calendar type is written to and read from the store's JSON.

public interface ICalendarSerializer

Remarks

Implemented by deriving from CalendarSerializer<TCalendar> rather than directly: the typed base is what makes a mismatched pairing a compile error rather than an InvalidCastException on the first calendar that round-trips.

Properties

CalendarTypeName

The discriminator written into the payload, and matched against when reading one.

string CalendarTypeName { get; }

Property Value

string

Methods

Create(JsonElement, JsonSerializerOptions)

Builds the calendar the payload describes, before its fields are read into it.

ICalendar Create(JsonElement jsonElement, JsonSerializerOptions options)

Parameters

jsonElement JsonElement
options JsonSerializerOptions

Returns

ICalendar

DeserializeFields(ICalendar, JsonElement, JsonSerializerOptions)

Reads the calendar's own fields back.

void DeserializeFields(ICalendar calendar, JsonElement jsonElement, JsonSerializerOptions options)

Parameters

calendar ICalendar
jsonElement JsonElement
options JsonSerializerOptions

SerializeFields(Utf8JsonWriter, ICalendar, JsonSerializerOptions)

Writes the calendar's own fields. The type, description, time zone and base calendar are written around this by the converter.

void SerializeFields(Utf8JsonWriter writer, ICalendar calendar, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
calendar ICalendar
options JsonSerializerOptions