using System; using System.Configuration; using System.Linq; using System.Linq.Expressions; using System.Web; using System.Web.Mvc; namespace Core.Html { public static class HtmlHelperExtensions { public static string StaticContent(this UrlHelper helper, string contentPath) { var staticResourceVersion = (ConfigurationManager.AppSettings.Get("appharbor.commit_id") ?? "_default").Substring(0, 8); var staticServer = ConfigurationManager.AppSettings.Get(ConfigKeys.StaticServer); var prefix = ""; if (!string.IsNullOrEmpty(staticServer)) prefix = "//" + staticServer; return prefix + "/s/" + staticResourceVersion + helper.Content(contentPath); } } }