Click or drag to resize
Task Scheduler Managed Class Library

TaskDefinition Class

Defines all the components of a task, such as the task settings, triggers, actions, and registration information.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTaskDefinition

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
[SerializableAttribute]
public sealed class TaskDefinition : IDisposable, 
	IXmlSerializable, INotifyPropertyChanged
Request Example View Source

The TaskDefinition type exposes the following members.

Properties
  NameDescription
Public propertyActions
Gets a collection of actions that are performed by the task.
Public propertyData
Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to extend the task format.
Public propertyLowestSupportedVersion
Gets the lowest supported version that supports the settings for this TaskDefinition.
Public propertyPrincipal
Gets the principal for the task that provides the security credentials for the task.
Public propertyRegistrationInfo
Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.
Public propertySettings
Gets the settings that define how the Task Scheduler service performs the task.
Public propertyTriggers
Gets a collection of triggers that are used to start a task.
Public propertyXmlText
Gets or sets the XML-formatted definition of the task.
Top
Methods
  NameDescription
Public methodCanUseUnifiedSchedulingEngine
Determines whether this TaskDefinition can use the Unified Scheduling Engine or if it contains unsupported properties.
Public methodDispose
Releases all resources used by this class.
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.)
Public methodStatic memberGetV1SchemaFile
Gets the XML Schema file for V1 tasks.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validates the current TaskDefinition.
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(TaskDefinition, Action)
Implements the operator + for actions on a definition, effectively adding the action to the definition.
Public operatorStatic memberAddition(TaskDefinition, Trigger)
Implements the operator + for triggers on a definition, effectively adding the trigger to the definition.
Top
Extension Methods
  NameDescription
Public Extension MethodGetFilteredAvailableActions
Filtered the supplied available actions based on this TaskDefinition and the version of the Task Scheduler.
(Defined by TaskServiceExtensions.)
Public Extension MethodGetFilteredAvailableTriggers
Filtered the supplied available triggers based on this TaskDefinition and the version of the Task Scheduler.
(Defined by TaskServiceExtensions.)
Top
See Also