Class JobDetailExtensions
- Namespace
- Quartz
- Assembly
- Quartz.dll
Conveniences over IJobDetail that need nothing but the interface.
public static class JobDetailExtensions
- Inheritance
-
JobDetailExtensions
- Inherited Members
Methods
GetJobBuilder(IJobDetail)
Get a JobBuilder<TJob> configured to produce a detail equivalent to this one.
public static JobBuilder<IJob> GetJobBuilder(this IJobDetail jobDetail)
Parameters
jobDetailIJobDetailThe detail to describe.
Returns
Remarks
An extension rather than an interface member, because a builder can be filled in from the detail's public state alone, and JobBuilder<TJob> is sealed: an implementation of IJobDetail other than Quartz's own could only have satisfied such a member by returning a builder that produces somebody else's type.
The result builds Quartz's own implementation, whatever it was called on — a builder is how a detail is described, not how a type is preserved. Use WithJobData(JobDataMap) to vary the job data of a detail of your own, and Clone() to copy one.
The job type is carried over as the JobType the detail holds, so a detail loaded from a job store whose stored type name does not resolve in this process rebuilds, and keeps the name as it was stored, rather than throwing here.