Esempio n. 1
0
 public static string ProductCategoryCatalogFileUrl(this StoreFront storeFront, string applicationPath, RouteData routeData, string fileName)
 {
     if (string.IsNullOrEmpty(applicationPath))
     {
         throw new ArgumentNullException("applicationPath");
     }
     if (string.IsNullOrWhiteSpace(fileName))
     {
         return null;
     }
     applicationPath = applicationPath.Trim('/');
     if (!string.IsNullOrEmpty(applicationPath))
     {
         applicationPath += "/";
     }
     if (routeData != null)
     {
         string storeName = routeData.UrlStoreName();
         if (!string.IsNullOrEmpty(storeName))
         {
             applicationPath += "Stores/" + HttpUtility.UrlEncode(storeName) + "/";
         }
     }
     return "/" + applicationPath + "CatalogContent/Categories/" + fileName;
 }