예제 #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);
        }
예제 #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;
        }