public static Uri UrlForCollection(string superCollection, string collection)
        {
            if (superCollection == null || collection == null || string.IsNullOrEmpty(superCollection) || string.IsNullOrEmpty(collection))
            {
                return(null);
            }

            return(new Uri(_hostPath.Value + "/" + FriendlyUrl.FriendlyUrlEncode(superCollection) + "/" + FriendlyUrl.FriendlyUrlEncode(collection) + "/"));
        }
Beispiel #2
0
        protected static Uri UrlForCollection(SuperCollection superCollection, Collection collection)
        {
            if (superCollection == null || collection == null || string.IsNullOrEmpty(superCollection.Title) || string.IsNullOrEmpty(collection.Title))
            {
                return(null);
            }

            string path = _hostPath.Value + "/" + FriendlyUrl.FriendlyUrlEncode(superCollection.Title) + "/";

            if (string.CompareOrdinal(superCollection.Title, collection.Title) != 0)
            {
                path += FriendlyUrl.FriendlyUrlEncode(collection.Title) + "/";
            }

            return(new Uri(path));
        }