rama creada apartir de master en j
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace adas_core.Domain.Models.MongoModels;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an alarm item entity.
|
||||
/// </summary>
|
||||
public class AlarmItem
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
@@ -21,19 +24,23 @@ public class AlarmItem
|
||||
public AlarmEnum.Severity Severity { get; set; } = AlarmEnum.Severity.None;
|
||||
public AlarmEnum.BeaconColor BeaconColor { get; set; } = AlarmEnum.BeaconColor.None;
|
||||
|
||||
/// <summary>
|
||||
/// Returns a formatted string representation of the <see cref="AlarmItem"/>, including the Enabled, StartBefore, EndAfter, Severity, and BeaconColor values, and optionally appending the Color value when it is not null or empty.
|
||||
/// </summary>
|
||||
/// <returns>A string in the format "AlarmItem[item1, item2, ...]" containing the key properties of the alarm item.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
List<string> items =
|
||||
[
|
||||
$"Enabled: {Enabled}",
|
||||
$"StartBefore: {StartBefore}",
|
||||
$"EndAfter: {EndAfter}",
|
||||
$"Severity: {Severity}",
|
||||
$"BeaconColorEnum: {BeaconColor}"
|
||||
];
|
||||
if (!string.IsNullOrEmpty(Color)) items.Add($"Color: {Color}");
|
||||
|
||||
|
||||
return "AlarmItem[" + string.Join(", ", items) + "]";
|
||||
}
|
||||
{
|
||||
List<string> items =
|
||||
[
|
||||
$"Enabled: {Enabled}",
|
||||
$"StartBefore: {StartBefore}",
|
||||
$"EndAfter: {EndAfter}",
|
||||
$"Severity: {Severity}",
|
||||
$"BeaconColorEnum: {BeaconColor}"
|
||||
];
|
||||
if (!string.IsNullOrEmpty(Color)) items.Add($"Color: {Color}");
|
||||
|
||||
|
||||
return "AlarmItem[" + string.Join(", ", items) + "]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user