Class StoredTriggerStates
- Namespace
- Quartz.Impl.AdoJobStore
- Assembly
- Quartz.dll
Translates between StoredTriggerState and the strings the trigger state columns hold.
public static class StoredTriggerStates
- Inheritance
-
StoredTriggerStates
- Inherited Members
Remarks
A custom IDriverDelegate binds these values into its own statements, so both directions are public. The strings themselves stay on AdoConstants, which is the schema contract.
Both halves are plain static methods. ToStoredValue(StoredTriggerState) used to be an extension, which made
the two directions of one mapping read as two different things — state.ToStoredValue() beside
StoredTriggerStates.FromStoredValue(value) — and the asymmetry was not fixable from the other
side, because string is not Quartz's to extend with a Quartz verb.
Methods
FromStoredValue(string?)
The state a stored column value stands for.
public static StoredTriggerState FromStoredValue(string? storedValue)
Parameters
storedValuestringThe column value, or null for a row that does not exist — which reads as Deleted, the same sentinel a missing trigger reports.
Returns
Remarks
A value this version does not recognise — left by a third-party delegate, a migration or a hand-repaired row — reads as Waiting, which is how the store has always treated it: schedulable, and reported as a normal trigger.
ToStoredValue(StoredTriggerState)
The value the trigger state column holds for this state.
public static string ToStoredValue(StoredTriggerState state)
Parameters
stateStoredTriggerState
Returns
Exceptions
- ArgumentOutOfRangeException
The state is not a defined enum member.