Table of Contents

Class UnitInfo

Namespace
XENBIT.ResQueServe.Core.Models
Assembly
RQS.Core.dll
public record UnitInfo : IUnitInfo, IShelf, IEquatable<UnitInfo>
Inheritance
UnitInfo
Implements
Inherited Members
Extension Methods

Constructors

UnitInfo()

public UnitInfo()

UnitInfo(UnitInfo)

protected UnitInfo(UnitInfo original)

Parameters

original UnitInfo

Properties

Callsign

The (long) callsign of the unit.

public string Callsign { get; set; }

Property Value

string

CallsignGps

The callsign displayed on maps if IsEquippedWithGps is set to true.

public string? CallsignGps { get; set; }

Property Value

string

CallsignShort

A short callsign variant of the unit.

public string CallsignShort { get; set; }

Property Value

string

Category

The category of the unit. By setting a value to CategoryOverride, this can be cosmetically overridden.

public UnitCategory Category { get; set; }

Property Value

UnitCategory

CategoryOverride

The overridden category of the unit.

public string? CategoryOverride { get; set; }

Property Value

string

DisplayCategory

Gets the display category of the unit.

[EntityTagIgnore]
public string DisplayCategory { get; }

Property Value

string

The display category.

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Id

public long Id { get; set; }

Property Value

long

IsNotVolunteerUnit

Indicates whether the unit is not a volunteer unit. Affects departure time calculations.

public bool IsNotVolunteerUnit { get; set; }

Property Value

bool

Origin

Gets or sets the origin information for this Shelf instance. May be null if the object was created locally or has no external source.

public ShelfOriginBase? Origin { get; set; }

Property Value

ShelfOriginBase

Station

The name of the point of interest (POI) where the unit is located.

public string Station { get; set; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(UnitInfo?)

public virtual bool Equals(UnitInfo? other)

Parameters

other UnitInfo

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

IsAbleToTransportPatients()

Checks if the unit is able to transport patients.

public bool IsAbleToTransportPatients()

Returns

bool

True if the unit is able to transport patients; otherwise, false.

IsAbleToTransportPatients(IUnitInfo)

public static bool IsAbleToTransportPatients(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsAmbulance()

Checks if the unit is an ambulance.

public bool IsAmbulance()

Returns

bool

True if the unit is an ambulance; otherwise, false.

IsAmbulance(IUnitInfo)

public static bool IsAmbulance(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsAmbulanceNonUrgent()

Checks if the unit is a non-urgent ambulance.

public bool IsAmbulanceNonUrgent()

Returns

bool

True if the unit is a non-urgent ambulance; otherwise, false.

IsAmbulanceNonUrgent(IUnitInfo)

public static bool IsAmbulanceNonUrgent(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsAmbulanceUrgent()

Checks if the unit is an urgent ambulance.

public bool IsAmbulanceUrgent()

Returns

bool

True if the unit is an urgent ambulance; otherwise, false.

IsAmbulanceUrgent(IUnitInfo)

public static bool IsAmbulanceUrgent(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsDoctor()

Checks if the unit is a doctor.

public bool IsDoctor()

Returns

bool

True if the unit is a doctor; otherwise, false.

IsDoctor(IUnitInfo)

public static bool IsDoctor(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsEmergencyMedicalService()

Checks if the unit is EMS

public bool IsEmergencyMedicalService()

Returns

bool

True if the unit is a EMS; otherwise, false.

IsEmergencyMedicalService(IUnitInfo)

public static bool IsEmergencyMedicalService(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsFirefighter()

Checks if the unit is a firefighter.

public bool IsFirefighter()

Returns

bool

True if the unit is a firefighter; otherwise, false.

IsFirefighter(IUnitInfo)

public static bool IsFirefighter(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsHelicopter()

Checks if the unit is a helicopter.

public bool IsHelicopter()

Returns

bool

True if the unit is a helicopter; otherwise, false.

IsHelicopter(IUnitInfo)

public static bool IsHelicopter(IUnitInfo unitInfo)

Parameters

unitInfo IUnitInfo

Returns

bool

IsInGroup(IUnitInfo, UnitCategoryGroup)

public static bool IsInGroup(IUnitInfo unitInfo, UnitCategoryGroup group)

Parameters

unitInfo IUnitInfo
group UnitCategoryGroup

Returns

bool

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

ToString(string)

Returns a string representation of the unit based on the specified format.

public string ToString(string format)

Parameters

format string

The format to use. Supported formats are "full", "middle", "short", and "gps".

Returns

string

A string representation of the unit based on the specified format:

  • "full" - Returns the callsign and category.
  • "middle" - Returns the short callsign and category.
  • "short" - Returns the short callsign.
  • "gps" - Returns the GPS callsign.

If the format is not recognized, the default ToString() method is called.

Operators

operator ==(UnitInfo?, UnitInfo?)

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

Parameters

left UnitInfo
right UnitInfo

Returns

bool

operator !=(UnitInfo?, UnitInfo?)

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

Parameters

left UnitInfo
right UnitInfo

Returns

bool