public static GetCategories ( ) : int>.Dictionary |
||
return | int>.Dictionary |
/// <summary> /// Get site categories as an id list. /// </summary> /// <param name="site"></param> /// <returns></returns> public static List <int> GetCategoriesAsIdList(this Site site, int?parent, bool recursive = false) { ICollection <SiteClaim> cats = site.GetCategories(parent, recursive); return(cats?.Select(c => c.Id)?.ToList()); }
/// <summary> /// Get all site categories. /// </summary> /// <param name="site"></param> /// <returns></returns> public static ICollection <SiteClaim> GetCategories(this Site site) { return(site.GetCategories(-1)); }