BlogEngine.Core.Json.JsonPosts.GetCategories C# (CSharp) Méthode

GetCategories() static private méthode

static private GetCategories ( ICollection categories ) : string
categories ICollection
Résultat string
        static string GetCategories(ICollection<Category> categories)
        {
            if (categories == null || categories.Count == 0)
                return string.Empty;

            var html = categories.Aggregate("", (current, cat) => current + string.Format("<a href='#' onclick=\"ChangePostFilter('Category','{0}','{1}')\">{1}</a>, ", cat.Id, cat.Title));
            return html.Trim().Substring(0, html.Trim().Length - 1);
        }