Class UnitInfo
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
originalUnitInfo
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.
[EntityTagIgnore]
public string DisplayCategory { get; }
Property Value
- string
The display category.
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Id
public long Id { get; set; }
Property Value
IsNotVolunteerUnit
Indicates whether the unit is not a volunteer unit. Affects departure time calculations.
public bool IsNotVolunteerUnit { 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
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(UnitInfo?)
public virtual bool Equals(UnitInfo? other)
Parameters
otherUnitInfo
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
IsInGroup(IUnitInfo, UnitCategoryGroup)
public static bool IsInGroup(IUnitInfo unitInfo, UnitCategoryGroup group)
Parameters
unitInfoIUnitInfogroupUnitCategoryGroup
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
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.
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
Returns
operator !=(UnitInfo?, UnitInfo?)
public static bool operator !=(UnitInfo? left, UnitInfo? right)