private static StatsPackage GetStatsPackage(DataServicePackage package) { return(new StatsPackage { Id = package.Id, Version = package.Version, DownloadCount = package.DownloadCount, // Workaround for the gallery url until it is fixed. Url = String.Format("http://nuget.org/List/Packages/{0}/{1}", HttpUtility.UrlPathEncode(package.Id), HttpUtility.UrlPathEncode(package.Version.ToString())) }); }
public string UrlPathEncode(string s) { return(HttpUtility.UrlPathEncode(s)); }