Table of Contents

Class CalendarIntervalTriggerSerializer

Namespace
Quartz.Serialization.SystemTextJson.Triggers
Assembly
Quartz.dll

How a ICalendarIntervalTrigger is written to and read from the store's JSON.

public class CalendarIntervalTriggerSerializer : TriggerSerializer<CalendarIntervalTriggerImpl>, ITriggerSerializer
Inheritance
CalendarIntervalTriggerSerializer
Implements
Inherited Members

Remarks

Public and unsealed on purpose: a trigger deriving from the built-in implementation pairs with a serializer deriving from this one, overriding SerializeFields and DeserializeFields and calling base so the built-in fields keep their stored shape.

Properties

TriggerTypeName

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

public override string TriggerTypeName { get; }

Property Value

string

Methods

CreateScheduleBuilder(JsonElement, JsonSerializerOptions)

Builds the schedule the payload describes, which the converter then hands to a trigger builder.

public override IScheduleBuilder CreateScheduleBuilder(JsonElement jsonElement, JsonSerializerOptions options)

Parameters

jsonElement JsonElement
options JsonSerializerOptions

Returns

IScheduleBuilder

DeserializeFields(CalendarIntervalTriggerImpl, JsonElement, JsonSerializerOptions)

Reads back the fields a schedule builder cannot carry. Does nothing unless a trigger type has any, which most do not.

protected override void DeserializeFields(CalendarIntervalTriggerImpl trigger, JsonElement jsonElement, JsonSerializerOptions options)

Parameters

trigger CalendarIntervalTriggerImpl
jsonElement JsonElement
options JsonSerializerOptions

SerializeFields(Utf8JsonWriter, CalendarIntervalTriggerImpl, JsonSerializerOptions)

Writes the trigger's own fields.

protected override void SerializeFields(Utf8JsonWriter writer, CalendarIntervalTriggerImpl trigger, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
trigger CalendarIntervalTriggerImpl
options JsonSerializerOptions