Class Missionload
- Namespace
- SIMDispatcher.Core.Models
- Assembly
- SIMDispatcher.Core.dll
Represents a data structure for scheduling simulated emergencies based on time and category within a dispatch center's operational plans. This record allows setting specific hours and the corresponding number of emergencies to be generated.
public record Missionload : IComparable<Missionload>, IComparable, IEquatable<Missionload>
- Inheritance
-
Missionload
- Implements
- Inherited Members
Properties
Amount
The amount of emergencies to be generated during the specified hour until the next defined hour in the schedule. For example, setting Hour to 10 and Amount to 15 means 15 emergencies will be generated starting at 10:00 until the next hour set in another Missionload item.
public int Amount { get; set; }
Property Value
Category
The category of mission this load applies to, influencing the type of emergencies simulated.
public MissionCategory Category { get; set; }
Property Value
CommandcenterId
Identifier for the command center associated with this Missionload.
public long CommandcenterId { get; set; }
Property Value
Hour
The hour of the day (0-23) this load starts. Represents the start time for generating the specified amount of emergencies.
public int Hour { get; set; }
Property Value
Id
public long Id { get; set; }
Property Value
Methods
CompareTo(Missionload?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(Missionload? other)
Parameters
other
MissionloadAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes other
in the sort order.Zero This instance occurs in the same position in the sort order as other
.Greater than zero This instance follows other
in the sort order.
CompareTo(object?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(object? obj)
Parameters
obj
objectAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes obj
in the sort order.Zero This instance occurs in the same position in the sort order as obj
.Greater than zero This instance follows obj
in the sort order.
Exceptions
- ArgumentException
obj
is not the same type as this instance.
IsValid()
Validates the properties of the Missionload to ensure they are within specified limits and appropriate settings.
public bool IsValid()
Returns
- bool
True if the Amount is within the range of 0-23 and the Category is not set to 'NotSet'; otherwise, false.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.