Innovenergy_trunk/csharp/app/API/DataModel/Path.cs

18 lines
380 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
namespace InnovEnergy.API.DataModel;
public record Path(Path? Parent, DataElement Element)
{
public override String ToString()
{
var path = Element.Name;
var parent = Parent;
while (parent is not null)
{
path = parent.Element.Name + "|" + path;
parent = parent.Parent;
}
return $"|{path}";
}
}