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

18 lines
380 B
C#

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}";
}
}