Table of Contents

Class UnitDutyExtensions

Namespace
XENBIT.ResQueServe.Core.Extensions
Assembly
RQS.Core.dll

Duty times of units with duty periods (OnlyOnPeriods). Shifts that follow each other without a break are one duty: a unit with 07–19 and 19–07 is on duty around the clock.

public static class UnitDutyExtensions
Inheritance
UnitDutyExtensions
Inherited Members

Methods

GetDutyEndingSoon(IUnit, DateTimeOffset)

The duty end when it is at most DutyEndWarningMinutes away (e.g. shown in the resource browser); otherwise null.

public static DateTimeOffset? GetDutyEndingSoon(this IUnit unit, DateTimeOffset now)

Parameters

unit IUnit
now DateTimeOffset

Returns

DateTimeOffset?

GetDutyEndsOn(IUnit, DateTimeOffset)

When the current duty ends (the end of the active shift and of the shifts directly following it); null when the unit has no duty periods, is not on duty or is on duty around the clock.

public static DateTimeOffset? GetDutyEndsOn(this IUnit unit, DateTimeOffset now)

Parameters

unit IUnit
now DateTimeOffset

Returns

DateTimeOffset?

GetDutyInformation(IUnit, DateTimeOffset)

The duty information of the unit at the session time: when the duty ends or the next starts (duty periods).

public static UnitDutyInformation GetDutyInformation(this IUnit unit, DateTimeOffset now)

Parameters

unit IUnit
now DateTimeOffset

Returns

UnitDutyInformation

GetNextDutyStartsOn(IUnit, DateTimeOffset)

When the next shift starts (within a week); null without duty periods.

public static DateTimeOffset? GetNextDutyStartsOn(this IUnit unit, DateTimeOffset now)

Parameters

unit IUnit
now DateTimeOffset

Returns

DateTimeOffset?