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
TCalendarThe 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
Methods
Create(JObject)
Builds the calendar instance the stored fields are then read into.
protected abstract TCalendar Create(JObject source)
Parameters
sourceJObjectThe stored JSON for one calendar.
Returns
- TCalendar
DeserializeFields(TCalendar, JObject)
Reads back what SerializeFields(JsonWriter, TCalendar) wrote.
protected abstract void DeserializeFields(TCalendar calendar, JObject source)
Parameters
calendarTCalendarThe calendar being rebuilt.
sourceJObjectThe 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
writerJsonWriterThe writer positioned inside the calendar's JSON object.
calendarTCalendarThe calendar being stored.