コード例 #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);
        }