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
TCalendarThe 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
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
jsonElementJsonElementoptionsJsonSerializerOptions
Returns
- TCalendar
DeserializeFields(TCalendar, JsonElement, JsonSerializerOptions)
Reads the calendar's own fields back.
protected abstract void DeserializeFields(TCalendar calendar, JsonElement jsonElement, JsonSerializerOptions options)
Parameters
calendarTCalendarjsonElementJsonElementoptionsJsonSerializerOptions
SerializeFields(Utf8JsonWriter, TCalendar, JsonSerializerOptions)
Writes the calendar's own fields.
protected abstract void SerializeFields(Utf8JsonWriter writer, TCalendar calendar, JsonSerializerOptions options)
Parameters
writerUtf8JsonWritercalendarTCalendaroptionsJsonSerializerOptions