-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHealthNode.cs
More file actions
32 lines (24 loc) · 854 Bytes
/
HealthNode.cs
File metadata and controls
32 lines (24 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace ApiHealthDashboard.Domain;
public sealed class HealthNode
{
public string Name { get; set; } = string.Empty;
public string Status { get; set; } = "Unknown";
public string? Description { get; set; }
public string? ErrorMessage { get; set; }
public string? DurationText { get; set; }
public Dictionary<string, object?> Data { get; set; } = new();
public List<HealthNode> Children { get; set; } = new();
public HealthNode Clone()
{
return new HealthNode
{
Name = Name,
Status = Status,
Description = Description,
ErrorMessage = ErrorMessage,
DurationText = DurationText,
Data = new Dictionary<string, object?>(Data),
Children = Children.Select(static child => child.Clone()).ToList()
};
}
}