Table of Contents

Class CalendarSerializer<TCalendar>

Namespace
Quartz.Serialization.Newtonsoft.Calendars
Assembly
Quartz.Serialization.Newtonsoft.dll

Convenience base class to strongly type a calendar serializer.

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

Type Parameters

TCalendar

The calendar type this serializer reads and writes.

Inheritance
CalendarSerializer<TCalendar>
Implements
Inherited Members

Properties

CalendarTypeName

The serializer-neutral name for the calendar type, matching the discriminator the System.Text.Json package writes for the same calendar. When non-empty, the registry indexes the serializer under this name as well as under the calendar's assembly-qualified type name, so a payload written by either package resolves. The default is empty: the serializer then answers only to the assembly-qualified name, which is what payloads written by 3.x carry.

public virtual string CalendarTypeName { get; }

Property Value

string

Methods

Create(JObject)

Builds the calendar instance the stored fields are then read into.

protected abstract TCalendar Create(JObject source)

Parameters

source JObject

The stored JSON for one calendar.

Returns

TCalendar

DeserializeFields(TCalendar, JObject)

protected abstract void DeserializeFields(TCalendar calendar, JObject source)

Parameters

calendar TCalendar

The calendar being rebuilt.

source JObject

The stored JSON for that calendar.

SerializeFields(JsonWriter, TCalendar)

Writes this kind of calendar's own fields, with the calendar already typed.

protected abstract void SerializeFields(JsonWriter writer, TCalendar calendar)

Parameters

writer JsonWriter

The writer positioned inside the calendar's JSON object.

calendar TCalendar

The calendar being stored.