Click or drag to resize
Task Scheduler Managed Class Library

TaskEventWatcher Constructor (TaskFolder, String, Boolean)

Initializes a new instance of the TaskEventWatcher class watching only those events for the tasks whose name matches the taskFilter in the specified taskFolder and optionally all subfolders.

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public TaskEventWatcher(
	TaskFolder taskFolder,
	string taskFilter = "*",
	bool includeSubfolders = false
)
Request Example View Source

Parameters

taskFolder
Type: Microsoft.Win32.TaskSchedulerTaskFolder
The task folder to watch.
taskFilter (Optional)
Type: SystemString
The filter for task names using standard file system wildcards. Use "*" to include all tasks.
includeSubfolders (Optional)
Type: SystemBoolean
if set to true include events from tasks subfolders.
Exceptions
ExceptionCondition
ArgumentNullExceptionOccurs if the taskFolder is null.
See Also