PropertySettingJobFactory Class

Quartz.NET 3.0 API Documentation
A JobFactory that instantiates the Job instance (using the default no-arg constructor, or more specifically: InstantiateTypeT(Type)), and then attempts to set all values from the IJobExecutionContext and the IJobExecutionContext's merged JobDataMap onto properties of the job.
Inheritance Hierarchy

SystemObject
  Quartz.SimplSimpleJobFactory
    Quartz.SimplPropertySettingJobFactory

Namespace:  Quartz.Simpl
Assembly:  Quartz (in Quartz.dll) Version: 3.0.0
Syntax

C#
public class PropertySettingJobFactory : SimpleJobFactory

The PropertySettingJobFactory type exposes the following members.

Constructors

  NameDescription
Public methodPropertySettingJobFactory
Initializes a new instance of the PropertySettingJobFactory class
Top
Properties

  NameDescription
Public propertyThrowIfPropertyNotFound
Whether the JobInstantiation should fail and throw and exception if a key (name) and value (type) found in the JobDataMap does not correspond to a property setter on the Job class.
Public propertyWarnIfPropertyNotFound
Get or set whether a warning should be logged if a key (name) and value (type) found in the JobDataMap does not correspond to a property setter on the Job class.
Top
Methods

  NameDescription
Protected methodConvertValueIfNecessary
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNewJob
Called by the scheduler at the time of the trigger firing, in order to produce a IJob instance on which to call Execute.
(Overrides SimpleJobFactoryNewJob(TriggerFiredBundle, IScheduler).)
Public methodReturnJob
Allows the job factory to destroy/cleanup the job if needed. No-op when using SimpleJobFactory.
(Inherited from SimpleJobFactory.)
Public methodSetObjectProperties
Sets the object properties.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Set the WarnIfPropertyNotFound property to true if you'd like noisy logging in the case of values in the JobDataMap not mapping to properties on your job class. This may be useful for troubleshooting typos of property names, etc. but very noisy if you regularly (and purposely) have extra things in your JobDataMap. Also of possible interest is the ThrowIfPropertyNotFound property which will throw exceptions on unmatched JobDataMap keys.
See Also

Reference