Пример #1
0
        public ISpaRouteBuilder Group(string path, string name, Action <ISpaRouteBuilder> builder)
        {
            var group = new SpaRouteItem
            {
                Path     = path,
                Name     = name,
                FullName = $"{FullName}-{name}",
                FullPath = string.IsNullOrEmpty(path) ? FullPath : $"{FullPath}/{path}"
            };

            builder(group);
            return(this);
        }
Пример #2
0
        public ISpaRouteBuilder Route(string path, string name)
        {
            var route = new SpaRouteItem
            {
                Path     = path,
                Name     = name,
                FullName = $"{FullName}-{name}",
                FullPath = string.IsNullOrEmpty(path) ? FullPath : $"{FullPath}/{path}"
            };

            Routes.Add(route);
            return(this);
        }