Class UnitDutyInformation
Duty information of a unit at the session time (e.g. in the unit context menu).
public sealed record UnitDutyInformation : IEquatable<UnitDutyInformation>
- Inheritance
-
UnitDutyInformation
- Implements
- Inherited Members
- Extension Methods
Constructors
UnitDutyInformation(long, UnitDutyOptions, DateTimeOffset?, DateTimeOffset?, int?)
Duty information of a unit at the session time (e.g. in the unit context menu).
public UnitDutyInformation(long UnitId, UnitDutyOptions DutyOptions, DateTimeOffset? DutyEndsOn, DateTimeOffset? NextDutyStartsOn, int? MinutesUntilChange)
Parameters
UnitIdlongThe unit.
DutyOptionsUnitDutyOptionsHow the unit's duty is defined (always, by day, by night, by duty periods).
DutyEndsOnDateTimeOffset?Duty periods: when the current duty ends (following shifts included); null when not on duty or around the clock.
NextDutyStartsOnDateTimeOffset?Duty periods, not on duty: when the next shift starts.
MinutesUntilChangeint?Minutes from the session time until
DutyEndsOnorNextDutyStartsOn.
Properties
DutyEndsOn
Duty periods: when the current duty ends (following shifts included); null when not on duty or around the clock.
public DateTimeOffset? DutyEndsOn { get; init; }
Property Value
DutyOptions
How the unit's duty is defined (always, by day, by night, by duty periods).
public UnitDutyOptions DutyOptions { get; init; }
Property Value
MinutesUntilChange
Minutes from the session time until DutyEndsOn or NextDutyStartsOn.
public int? MinutesUntilChange { get; init; }
Property Value
- int?
NextDutyStartsOn
Duty periods, not on duty: when the next shift starts.
public DateTimeOffset? NextDutyStartsOn { get; init; }
Property Value
UnitId
The unit.
public long UnitId { get; init; }
Property Value
Methods
Deconstruct(out long, out UnitDutyOptions, out DateTimeOffset?, out DateTimeOffset?, out int?)
public void Deconstruct(out long UnitId, out UnitDutyOptions DutyOptions, out DateTimeOffset? DutyEndsOn, out DateTimeOffset? NextDutyStartsOn, out int? MinutesUntilChange)
Parameters
UnitIdlongDutyOptionsUnitDutyOptionsDutyEndsOnDateTimeOffset?NextDutyStartsOnDateTimeOffset?MinutesUntilChangeint?
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(UnitDutyInformation?)
public bool Equals(UnitDutyInformation? other)
Parameters
otherUnitDutyInformation
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(UnitDutyInformation?, UnitDutyInformation?)
public static bool operator ==(UnitDutyInformation? left, UnitDutyInformation? right)
Parameters
leftUnitDutyInformationrightUnitDutyInformation
Returns
operator !=(UnitDutyInformation?, UnitDutyInformation?)
public static bool operator !=(UnitDutyInformation? left, UnitDutyInformation? right)
Parameters
leftUnitDutyInformationrightUnitDutyInformation