Table of Contents

Class CalendarSerializer<TCalendar>

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

The base class for a serializer of a calendar type of your own.

public abstract class CalendarSerializer<TCalendar> : ICalendarSerializer where TCalendar : ICalendar

Type Parameters

TCalendar

The calendar type this serializer is for.

Inheritance
CalendarSerializer<TCalendar>
Implements
Inherited Members

Remarks

Register one with AddCalendarSerializer inside UseSystemTextJsonSerializer(configure); without it the first store write of that calendar fails, naming the type.

Properties

CalendarTypeName

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

public abstract string CalendarTypeName { get; }

Property Value

string

Methods

Create(JsonElement, JsonSerializerOptions)

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

protected abstract TCalendar Create(JsonElement jsonElement, JsonSerializerOptions options)

Parameters

jsonElement JsonElement
options JsonSerializerOptions

Returns

TCalendar

DeserializeFields(TCalendar, JsonElement, JsonSerializerOptions)

Reads the calendar's own fields back.

protected abstract void DeserializeFields(TCalendar calendar, JsonElement jsonElement, JsonSerializerOptions options)

Parameters

calendar TCalendar
jsonElement JsonElement
options JsonSerializerOptions

SerializeFields(Utf8JsonWriter, TCalendar, JsonSerializerOptions)

Writes the calendar's own fields.

protected abstract void SerializeFields(Utf8JsonWriter writer, TCalendar calendar, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
calendar TCalendar
options JsonSerializerOptions