Class DispatchCenterCustomEquipment
public record DispatchCenterCustomEquipment : IDispatchCenterCustomEquipment, IEquatable<DispatchCenterCustomEquipment>
- Inheritance
-
DispatchCenterCustomEquipment
- Implements
- Inherited Members
- Extension Methods
Constructors
DispatchCenterCustomEquipment()
public DispatchCenterCustomEquipment()
DispatchCenterCustomEquipment(DispatchCenterCustomEquipment)
protected DispatchCenterCustomEquipment(DispatchCenterCustomEquipment original)
Parameters
originalDispatchCenterCustomEquipment
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Id
public long Id { get; set; }
Property Value
Number
The slot number used for this equipment, ranging from 1 to 20. Each number is unique within the command center.
public int Number { get; set; }
Property Value
Text
The display name of the equipment.
public string Text { get; set; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(DispatchCenterCustomEquipment?)
public virtual bool Equals(DispatchCenterCustomEquipment? other)
Parameters
Returns
GetCustomUnitEquipment()
Calculates the corresponding UnitEquipment enum index based on the custom number assigned.
public UnitEquipment? GetCustomUnitEquipment()
Returns
- UnitEquipment?
A nullable UnitEquipment representing the custom equipment or null if the number is outside the valid range.
Exceptions
- InvalidOperationException
Thrown when the
<pre><code class="lang-csharp">Number is >= 1 and <= 20</code></pre> .
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(DispatchCenterCustomEquipment?, DispatchCenterCustomEquipment?)
public static bool operator ==(DispatchCenterCustomEquipment? left, DispatchCenterCustomEquipment? right)
Parameters
Returns
operator !=(DispatchCenterCustomEquipment?, DispatchCenterCustomEquipment?)
public static bool operator !=(DispatchCenterCustomEquipment? left, DispatchCenterCustomEquipment? right)