TaskDefinition Class

Defines all the components of a task, such as the task settings, triggers, actions, and registration information.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
[SerializableAttribute]
[XmlRootAttribute("Task", Namespace = "http://schemas.microsoft.com/windows/2004/02/mit/task", 
	IsNullable = false)]
[XmlSchemaProviderAttribute("GetV1SchemaFile")]
public sealed class TaskDefinition : IDisposable, 
	IXmlSerializable, INotifyPropertyChanged
Inheritance
Object    TaskDefinition
Implements
INotifyPropertyChanged, IDisposable, IXmlSerializable

Properties

ActionsGets a collection of actions that are performed by the task.
Data 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.
LowestSupportedVersionGets the lowest supported version that supports the settings for this TaskDefinition.
PrincipalGets the principal for the task that provides the security credentials for the task.
RegistrationInfo 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.
SettingsGets the settings that define how the Task Scheduler service performs the task.
TriggersGets a collection of triggers that are used to start a task.
XmlTextGets or sets the XML-formatted definition of the task.

Methods

CanUseUnifiedSchedulingEngine Determines whether this TaskDefinition can use the Unified Scheduling Engine or if it contains unsupported properties.
DisposeReleases all resources used by this class.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetV1SchemaFileGets the XML Schema file for V1 tasks.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)
ValidateValidates the current TaskDefinition.

Events

PropertyChangedOccurs when a property value changes.

Operators

Addition(TaskDefinition, Action)Implements the operator + for actions on a definition, effectively adding the action to the definition.
Addition(TaskDefinition, Trigger)Implements the operator + for triggers on a definition, effectively adding the trigger to the definition.

Extension Methods

GetFilteredAvailableActionsFiltered the supplied available actions based on this TaskDefinition and the version of the Task Scheduler.
(Defined by TaskServiceExtensions)
GetFilteredAvailableTriggersFiltered the supplied available triggers based on this TaskDefinition and the version of the Task Scheduler.
(Defined by TaskServiceExtensions)

See Also