Esempio n. 1
0
        public UrlParseResult Parse(Uri uri)
        {
            var cleanSegments = uri.Segments.Select(x => x.Replace("/", string.Empty)).ToArray();

            var result = new UrlParseResult
            {
                Folders  = cleanSegments.Take(uri.Segments.Length - 1).Skip(1).ToArray(),
                Filename = cleanSegments.Last()
            };

            return(result);
        }
Esempio n. 2
0
        public UrlParseResult Parse(Uri uri)
        {
            var cleanSegments = uri.Segments.Select(x => x.Replace("/", string.Empty)).ToArray();

            var result = new UrlParseResult
            {
                Folders = cleanSegments.Take(uri.Segments.Length - 1).Skip(1).ToArray(),
                Filename = cleanSegments.Last()
            };

            return result;
        }