Represents a SharePoint Foundation upgrade job definition.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Instances of this class are used to represent the job definition that is associated with an upgrade. The class is derived from the SPJobDefinition class. SPUpgradeJobDefinition objects can appear in the SPJobDefinitionCollection object that is associated with an SPTimerService object.
Use the constructor to create an instance of the SPUpgradeJobDefinition class. Specify the root object for the upgrade by setting the Object property. Specify the upgrade mode by setting the Mode property to in place. Add it to a job queue by calling the Add method of the appropriate job definition collection.
When an upgrade timer job is executing, you can use the SPUpgradeSession object associated with this job to monitor the progress. Retrieve the SPUpgradeSession object from the SessionId property to get the object ID, and then call GetObject() to obtain the object.