Gets the work time intervals before a specified date and time and until summing up to a specified required work duration.

Namespace:  DlhSoft.Windows.Data
Assembly:  DlhSoft.ProjectData.Core (in DlhSoft.ProjectData.Core.dll)

Syntax

C#
public ReadOnlyCollection<TimeInterval> GetPreviousWorkTimeIntervals(
	DateTime start,
	TimeSpan requiredWorkDuration,
	bool areIntervalEndsAccepted
)
Visual Basic (Declaration)
Public Function GetPreviousWorkTimeIntervals ( _
	start As DateTime, _
	requiredWorkDuration As TimeSpan, _
	areIntervalEndsAccepted As Boolean _
) As ReadOnlyCollection(Of TimeInterval)

Parameters

start
Type: System..::.DateTime
The date and time to start searching at.
requiredWorkDuration
Type: System..::.TimeSpan
The required work duration sum to get.
areIntervalEndsAccepted
Type: System..::.Boolean
Indicates whether or not to accept interval ends as valid times within the returned time interval collection.

Return Value

The work time intervals before the specified date and time and until summing up to the specified required work duration.

Exceptions

ExceptionCondition
System..::.ArgumentOutOfRangeExceptionThe specified required work duration is not positive.

See Also