Click or drag to resize
Task Scheduler Managed Class Library

TriggerCollection Class

Provides the methods that are used to add to, remove from, and get the triggers of a task.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTriggerCollection

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.12.0
Syntax
C#
[XmlRootAttribute("Triggers", Namespace = "http://schemas.microsoft.com/windows/2004/02/mit/task", 
	IsNullable = false)]
public sealed class TriggerCollection : IEnumerable, 
	IDisposable, IXmlSerializable, IList, ICollection, INotifyCollectionChanged, 
	INotifyPropertyChanged
Request Example View Source

The TriggerCollection type exposes the following members.

Properties
 NameDescription
Public propertyCountGets the number of triggers in the collection.
Public propertyItemInt32Gets a specified trigger from the collection.
Public propertyItemStringGets or sets a specified trigger from the collection.
Top
Methods
 NameDescription
Public methodAddTTriggerAdd an unbound Trigger to the task.
Public methodAddNewAdd a new trigger to the collections of triggers for the task.
Public methodAddRangeAdds a collection of unbound triggers to the end of the TriggerCollection.
Public methodClearClears all triggers from the task.
Public methodContainsDetermines whether the ICollectionT contains a specific value.
Public methodContainsTypeDetermines whether the specified trigger type is contained in this collection.
Public methodCopyTo(Trigger, Int32) Copies the elements of the ICollectionT to an Array, starting at a particular Array index.
Public methodCopyTo(Int32, Trigger, Int32, Int32) Copies the elements of the TriggerCollection to a Trigger array, starting at a particular Trigger array index.
Public methodDisposeReleases all resources used by this class.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFind Searches for an Trigger that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection.
Public methodFindIndexOf(PredicateTrigger) Searches for an Trigger that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection.
Public methodFindIndexOf(Int32, Int32, PredicateTrigger) Searches for an Trigger that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements.
Public methodGetEnumeratorGets the collection enumerator for this collection.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIndexOf(String)Determines the index of a specific item in the IListT.
Public methodIndexOf(Trigger)Determines the index of a specific item in the IListT.
Public methodInsertInserts an trigger at the specified index.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRemoveRemoves the first occurrence of a specific object from the ICollectionT.
Public methodRemoveAtRemoves the trigger at a specified index.
Public methodToArrayCopies the elements of the TriggerCollection to a new array.
Public methodToStringReturns a String that represents the triggers in this collection.
(Overrides ObjectToString)
Top
Events
 NameDescription
Public eventCollectionChangedOccurs when a collection changes.
Public eventPropertyChangedOccurs when a property value changes.
Top
See Also