namespace InnovEnergy.API.DataModel; public static class DataElementExtensions { public static IEnumerable GetChildren(this DataElement de) { return de switch { Folder f => f.Folders.Concat(f.Installations).Concat(f.Users), Installation i => i.Users, _ => Enumerable.Empty() }; } public static Path RelativePath(this DataElement root) => new Path(null, root); }