/// <summary> /// Read styles from field datasource or configuration file and add to the cache /// </summary> protected virtual void SetStyles() { var str = StringUtil.GetString(new string[1] { Source }); Styles = StringUtil.ExtractParameter(StylesParameterName, str); if (!string.IsNullOrEmpty(Styles)) { var paths = Styles.Split(','); CssCacheManager.GetCache(Styles).Set(paths); } else { CssCacheManager.GetCache().Set(); } }
public ActionResult Load(string styles, string query) { return(Json(new { suggestions = CssCacheManager.GetCache(styles).Get(query).Select(s => new { value = s, data = s }) }, JsonRequestBehavior.AllowGet)); }