Class QuartzOptions
- Namespace
- Quartz
- Assembly
- Quartz.dll
The flat quartz.* property keys a scheduler was configured with.
public sealed class QuartzOptions
- Inheritance
-
QuartzOptions
- Inherited Members
Remarks
This type used to be a Dictionary<TKey, TValue> and to double as the store for a scheduler's jobs and triggers, because the flat string bag was the pivot the whole configuration model turned on. It is not any more: settings bind onto typed options such as QuartzSchedulerOptions and ThreadPoolOptions, and jobs and triggers are registered per scheduler in the container, since they are a scheduler's content rather than its configuration.
What is left is the legacy string format, held in Properties: keys that select an
implementation by type name, and keys that configure a component which has no options type of its own.
QuartzPropertyBridge is the only thing that reads them.
Properties
Properties
The flat quartz.* keys, exactly as they were given.
public Dictionary<string, string?> Properties { get; }
Property Value
Remarks
Setting a key here is still the way to configure something the typed options do not cover — a third-party job store's own settings, for instance.
Scheduling
How the jobs, triggers and calendars a scheduler is configured with are applied to it.
public SchedulingOptions Scheduling { get; }
Property Value
Remarks
These are directives about applying a schedule rather than settings of a component, so they have
no options type of their own to bind onto: ContainerConfigurationProcessor reads them from
here, and the Quartz:Scheduling configuration section binds onto them. They stay on this
type for that reason, while the settings that duplicated a typed option have gone.
Get-only, like Properties. Options callbacks compose by running in order over one
instance, and assignment is the one operation that is not additive: a callback assigning a fresh
SchedulingOptions would silently discard whatever Quartz:Scheduling — or an
earlier callback — had put there. The configuration binder binds into a non-null complex
property without needing a setter, so the section keeps working unchanged.
Methods
ToProperties()
Returns a snapshot of the flat keys, in the shape UseProperties and AddQuartz take.
public Dictionary<string, string?> ToProperties()
Returns
Remarks
Properties is the live bag this options instance goes on being configured through, so a caller that wants to hand one scheduler's keys to another takes a copy here rather than passing that one along. Every key is copied, including ones whose value is null or whitespace: deciding that an empty value means "not configured" belongs to the reader, and a converter that dropped keys of its own accord would make a key set to an empty string indistinguishable from one that was never given.