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

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.

public string DisplayCategory { get; }

Property Value

string

The display category.

Id

public long Id { get; set; }

Property Value

long

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

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

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

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.