TimeSchedulerInterval
Namespace: TagBites.WinSchedulers
Assembly: TagBites.WinSchedulers.dll
Product: TagBites.WinSchedulers v. 1.3.8
Represents a TimeScheduler date time interval.
public struct TimeSchedulerIntervalConstructors
Section titled “Constructors”TimeSchedulerInterval(DateTime, DateTime)
Section titled “TimeSchedulerInterval(DateTime, DateTime)”Initializes a new instance of the TimeSchedulerInterval class with specified start and end datetime.
public TimeSchedulerInterval(DateTime start, DateTime end)Parameters
Section titled “Parameters”TimeSchedulerInterval(DateTime, TimeSpan)
Section titled “TimeSchedulerInterval(DateTime, TimeSpan)”Initializes a new instance of the TimeSchedulerInterval class with specified start datetime and duration.
public TimeSchedulerInterval(DateTime start, TimeSpan duration)Parameters
Section titled “Parameters”Fields
Section titled “Fields”A instance of the TimeSchedulerInterval structure whose Start and End have DateTime.MinValue value.
public TimeSchedulerInterval EmptyField Value
Section titled “Field Value”A instance of the TimeSchedulerInterval structure whose Start has DateTime.MinValue value and End has DateTime.MaxValue value.
public TimeSchedulerInterval FullField Value
Section titled “Field Value”Properties
Section titled “Properties”Duration
Section titled “Duration”Gets a duration of the interval.
public TimeSpan Duration { get; }Property Value
Section titled “Property Value”An object whose value is the end date time of the interval.
Gets the end date time of the interval.
public DateTime End { get; }Property Value
Section titled “Property Value”An object whose value is the end date time of the interval.
IntersectDaysCount
Section titled “IntersectDaysCount”Gets the number of days included in the interval.
public int IntersectDaysCount { get; }Property Value
Section titled “Property Value”the number of days included in the interval.
IsEmpty
Section titled “IsEmpty”Gets a value indicating whether the Start and End have the same value.
public bool IsEmpty { get; }Property Value
Section titled “Property Value”true if the Start and End have the same value; otherwise, false.
Middle
Section titled “Middle”Gets a middle date time of the interval.
public DateTime Middle { get; }Property Value
Section titled “Property Value”An object whose value is the middle date time of the interval.
Gets the start date time of the interval.
public DateTime Start { get; }Property Value
Section titled “Property Value”An object whose value is the start date time of the interval.
Methods
Section titled “Methods”CompleteIntersectsWith(TimeSchedulerInterval)
Section titled “CompleteIntersectsWith(TimeSchedulerInterval)”Determines whether the interval complete intersect with specified interval.
public bool CompleteIntersectsWith(TimeSchedulerInterval interval)Parameters
Section titled “Parameters”intervalTimeSchedulerInterval
The interval to test.
Returns
Section titled “Returns”true if the interval complete intersect with specified interval; otherwise, false.
Contains(DateTime)
Section titled “Contains(DateTime)”Determines whether the interval contains the specified date time.
public bool Contains(DateTime dt)Parameters
Section titled “Parameters”dtDateTime
The date time to locate in the interval.
Returns
Section titled “Returns”true if the interval contains the specified date time; otherwise, false.
Contains(TimeSchedulerInterval)
Section titled “Contains(TimeSchedulerInterval)”Determines whether the interval contains the specified interval.
public bool Contains(TimeSchedulerInterval interval)Parameters
Section titled “Parameters”intervalTimeSchedulerInterval
The date time interval to locate in the interval.
Returns
Section titled “Returns”true if the interval contains the specified interval; otherwise, false.
DayIntersect(DateTime)
Section titled “DayIntersect(DateTime)”Creates and returns a interval that is the day intersection of the current TimeSchedulerInterval and the specified DateTime.
public TimeSchedulerInterval DayIntersect(DateTime dt)Parameters
Section titled “Parameters”dtDateTime
A date time to intersect with the current TimeSchedulerInterval.
Returns
Section titled “Returns”A new interval that represents the intersection of the current TimeSchedulerInterval and the specified interval. This object is Empty if the intersection is empty.
Equals(TimeSchedulerInterval)
Section titled “Equals(TimeSchedulerInterval)”Determines whether the interval is equal to the other.
public bool Equals(TimeSchedulerInterval other)Parameters
Section titled “Parameters”otherTimeSchedulerInterval
A interval to compare with.
Returns
Section titled “Returns”>true if the interval is equal to the other; otherwise, false.
Equals(object)
Section titled “Equals(object)”public virtual bool Equals(object obj)Parameters
Section titled “Parameters”objobject
Returns
Section titled “Returns”Exclude(TimeSchedulerInterval)
Section titled “Exclude(TimeSchedulerInterval)”Creates and returns a array of intervals that contain only the portion of the current TimeSchedulerInterval that does not intersect with the specified TimeSchedulerInterval.
public TimeSchedulerInterval[] Exclude(TimeSchedulerInterval interval)Parameters
Section titled “Parameters”intervalTimeSchedulerInterval
>A interval to exclude from the current TimeSchedulerInterval.
Returns
Section titled “Returns”A array of intervals that contain only the portion of the current TimeSchedulerInterval that does not intersect with the specified interval.
GetHashCode()
Section titled “GetHashCode()”public virtual int GetHashCode()Returns
Section titled “Returns”Intersect(TimeSchedulerInterval)
Section titled “Intersect(TimeSchedulerInterval)”Creates and returns a interval that is the intersection of the current TimeSchedulerInterval and the specified TimeSchedulerInterval.
public TimeSchedulerInterval Intersect(TimeSchedulerInterval dt)Parameters
Section titled “Parameters”dtTimeSchedulerInterval
A interval to intersect with the current TimeSchedulerInterval.
Returns
Section titled “Returns”A new interval that represents the intersection of the current TimeSchedulerInterval and the specified target. This object is Empty if the intersection is empty.
IntersectsWith(TimeSchedulerInterval)
Section titled “IntersectsWith(TimeSchedulerInterval)”Determines whether the interval intersect with specified interval.
public bool IntersectsWith(TimeSchedulerInterval interval)Parameters
Section titled “Parameters”intervalTimeSchedulerInterval
The interval to test.
Returns
Section titled “Returns”true if the interval intersect with specified interval; otherwise, false.
IntersectsWith(DateTime, DateTime)
Section titled “IntersectsWith(DateTime, DateTime)”Determines whether the interval intersect with specified dates.
public bool IntersectsWith(DateTime start, DateTime end)Parameters
Section titled “Parameters”Returns
Section titled “Returns”>true if the interval intersect with specified dates; otherwise, false.
ToString()
Section titled “ToString()”public virtual string ToString()Returns
Section titled “Returns”Union(TimeSchedulerInterval)
Section titled “Union(TimeSchedulerInterval)”Creates and returns a interval that contains the union of the current TimeSchedulerInterval and the specified TimeSchedulerInterval.
public TimeSchedulerInterval Union(TimeSchedulerInterval interval)Parameters
Section titled “Parameters”intervalTimeSchedulerInterval
>A interval to intersect with the current TimeSchedulerInterval.
Returns
Section titled “Returns”A new interval that represents the union of the current TimeSchedulerInterval and the specified interval.
Union(IEnumerable<TimeSchedulerInterval?>)
Section titled “Union(IEnumerable<TimeSchedulerInterval?>)”Creates and returns a interval that contains the union of the specified intervals.
public static TimeSchedulerInterval? Union(IEnumerable<TimeSchedulerInterval?> items)Parameters
Section titled “Parameters”itemsIEnumerable<TimeSchedulerInterval?>
Returns
Section titled “Returns”Union(IEnumerable<TimeSchedulerInterval>)
Section titled “Union(IEnumerable<TimeSchedulerInterval>)”Creates and returns a interval that contains the union of the specified intervals.
public static TimeSchedulerInterval? Union(IEnumerable<TimeSchedulerInterval> items)Parameters
Section titled “Parameters”itemsIEnumerable<TimeSchedulerInterval>
Returns
Section titled “Returns”operator ==(TimeSchedulerInterval, TimeSchedulerInterval)
Section titled “operator ==(TimeSchedulerInterval, TimeSchedulerInterval)”Determines whether the specified TimeSchedulerInterval instances are considered equal.
public static bool operator ==(TimeSchedulerInterval left, TimeSchedulerInterval right)Parameters
Section titled “Parameters”leftTimeSchedulerInterval
The first TimeSchedulerInterval object to compare.rightTimeSchedulerInterval
The second TimeSchedulerInterval object to compare.
Returns
Section titled “Returns”true if the TimeSchedulerInterval objects are considered equal; otherwise, false.
operator !=(TimeSchedulerInterval, TimeSchedulerInterval)
Section titled “operator !=(TimeSchedulerInterval, TimeSchedulerInterval)”Determines whether the specified TimeSchedulerInterval instances are considered different.
public static bool operator !=(TimeSchedulerInterval left, TimeSchedulerInterval right)Parameters
Section titled “Parameters”leftTimeSchedulerInterval
The first TimeSchedulerInterval object to compare.rightTimeSchedulerInterval
The second TimeSchedulerInterval object to compare.
Returns
Section titled “Returns”true if the TimeSchedulerInterval objects are considered different; otherwise, false.