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
CallsignGps
The callsign displayed on maps if IsEquippedWithGps is set to true.
public string? CallsignGps { get; set; }
Property Value
CallsignShort
A short callsign variant of the unit.
public string CallsignShort { get; set; }
Property Value
Category
The category of the unit. By setting a value to CategoryOverride, this can be cosmetically overridden.
public UnitCategory Category { get; set; }
Property Value
CategoryOverride
The overridden category of the unit.
public string? CategoryOverride { get; set; }
Property Value
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
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
Station
The name of the point of interest (POI) where the unit is located.
public string Station { get; set; }
Property Value
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
unitInfoIUnitInfo
Returns
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
formatstringThe 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.