![]() | Repetition |
[XmlRootAttribute("Repetition", Namespace = "http://schemas.microsoft.com/windows/2004/02/mit/task", IsNullable = true)] public sealed class RepetitionPattern : IDisposable, IXmlSerializable, IEquatable<RepetitionPattern>, INotifyPropertyChanged
The RepetitionPattern type exposes the following members.
Name | Description | |
---|---|---|
![]() | RepetitionPattern | Initializes a new instance of the RepetitionPattern class. |
Name | Description | |
---|---|---|
![]() | Duration | Gets or sets how long the pattern is repeated. |
![]() | Interval | Gets or sets the amount of time between each restart of the task. |
![]() | StopAtDurationEnd | Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. |
Name | Description | |
---|---|---|
![]() | Dispose | Releases all resources used by this class. |
![]() | Equals(Object) | Determines whether the specified Object, is equal to this instance. (Overrides ObjectEquals(Object)) |
![]() | Equals(RepetitionPattern) | Indicates whether the current object is equal to another object of the same type. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
![]() | GetHashCode | Returns a hash code for this instance. (Overrides ObjectGetHashCode) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | IsSet | Determines whether any properties for this RepetitionPattern have been set. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
![]() | PropertyChanged | Occurs when a property value changes. |
// Create a time trigger with a repetition var tt = new TimeTrigger(new DateTime().Now.AddHours(1)); // Set the time in between each repetition of the task after it starts to 30 minutes. tt.Repetition.Interval = TimeSpan.FromMinutes(30); // Default is TimeSpan.Zero (or never) // Set the time the task will repeat to 1 day. tt.Repetition.Duration = TimeSpan.FromDays(1); // Default is TimeSpan.Zero (or never) // Set the task to end even if running when the duration is over tt.Repetition.StopAtDurationEnd = true; // Default is false; // Do the same as above with a constructor tt = new TimeTrigger(new DateTime().Now.AddHours(1)) { Repetition = new RepetitionPattern(TimeSpan.FromMinutes(30), TimeSpan.FromDays(1), true) };