2022-10-30 19:48:24 +03:00
|
|
|
namespace CodeLiturgy.Views.Utils
|
2022-09-26 04:05:23 +03:00
|
|
|
{
|
2022-11-17 00:17:44 +03:00
|
|
|
public class Url
|
2022-09-26 04:05:23 +03:00
|
|
|
{
|
2022-11-17 00:17:44 +03:00
|
|
|
public string Name;
|
|
|
|
public string Location;
|
|
|
|
|
|
|
|
public Url(string name, string location)
|
|
|
|
{
|
|
|
|
Name = name;
|
|
|
|
Location = location;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public record RouteRecord(string Name, string RouteKey, string Location, string ControllerName, List<RouteRecord> Children, ViewType ViewType = ViewType.Undefined)
|
|
|
|
{
|
|
|
|
|
|
|
|
public List<Url> ChildrenToUrl()
|
|
|
|
{
|
|
|
|
return Children.Select(x => x.ToUrl()).ToList();
|
|
|
|
}
|
|
|
|
public Url ToUrl()
|
|
|
|
{
|
|
|
|
return new Url(Name, Location);
|
|
|
|
}
|
|
|
|
public Url ToUrl(string name)
|
|
|
|
{
|
|
|
|
return new Url(name, Location);
|
|
|
|
}
|
|
|
|
|
2022-09-26 04:05:23 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|