Table of Contents

Class UnitDutyInformation

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

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

UnitId long

The unit.

DutyOptions UnitDutyOptions

How the unit's duty is defined (always, by day, by night, by duty periods).

DutyEndsOn DateTimeOffset?

Duty periods: when the current duty ends (following shifts included); null when not on duty or around the clock.

NextDutyStartsOn DateTimeOffset?

Duty periods, not on duty: when the next shift starts.

MinutesUntilChange int?

Minutes from the session time until DutyEndsOn or NextDutyStartsOn.

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

DateTimeOffset?

DutyOptions

How the unit's duty is defined (always, by day, by night, by duty periods).

public UnitDutyOptions DutyOptions { get; init; }

Property Value

UnitDutyOptions

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

DateTimeOffset?

UnitId

The unit.

public long UnitId { get; init; }

Property Value

long

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

UnitId long
DutyOptions UnitDutyOptions
DutyEndsOn DateTimeOffset?
NextDutyStartsOn DateTimeOffset?
MinutesUntilChange int?

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(UnitDutyInformation?)

public bool Equals(UnitDutyInformation? other)

Parameters

other UnitDutyInformation

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(UnitDutyInformation?, UnitDutyInformation?)

public static bool operator ==(UnitDutyInformation? left, UnitDutyInformation? right)

Parameters

left UnitDutyInformation
right UnitDutyInformation

Returns

bool

operator !=(UnitDutyInformation?, UnitDutyInformation?)

public static bool operator !=(UnitDutyInformation? left, UnitDutyInformation? right)

Parameters

left UnitDutyInformation
right UnitDutyInformation

Returns

bool