/// <summary>
 ///   Save current CSS bundle as a cached resource on server
 /// </summary>
 /// <param name="cssBundle">Current CSS bundle</param>
 /// <param name="name">Name with which to store current bundle</param>
 /// <returns>Cached bundle access HTML tag</returns>
 public static string AsCached(this CSSBundle cssBundle, ContentBundle name)
 {
     return(cssBundle.AsCached(name.ToString(), "~/assets/css/" + name));
 }
 /// <summary>
 ///   Save current JavaScript bundle as a cached resource on server
 /// </summary>
 /// <param name="jsBundle">Current JavaScript bundle</param>
 /// <param name="name">Name with which to store current bundle</param>
 /// <returns>Cached bundle access HTML tag</returns>
 public static string AsCached(this JavaScriptBundle jsBundle, ContentBundle name)
 {
     return(jsBundle.AsCached(name.ToString(), "~/assets/js/" + name));
 }
Esempio n. 3
0
 /// <summary>
 /// Returns the JS cache Url based on the given content bundle
 /// </summary>
 /// <param name="bundle">Content bundle</param>
 /// <returns>JS cache Url</returns>
 public static string ResolveJsPath(ContentBundle bundle)
 {
     return(string.Format("~/Assets/Js/{0}", bundle.GetStringValue()));
 }