Пример #1
0
 public static BlogDescriptor[] GetBlogs(bool sortByName)
 {
     string[] ids = GetBlogIds();
     BlogDescriptor[] blogs = new BlogDescriptor[ids.Length];
     for (int i = 0; i < ids.Length; i++)
     {
         using (BlogSettings settings = BlogSettings.ForBlogId(ids[i]))
             blogs[i] = new BlogDescriptor(ids[i], settings.BlogName, settings.HomepageUrl);
     }
     if (sortByName)
         Array.Sort(blogs, new BlogDescriptor.Comparer());
     return blogs;
 }
Пример #2
0
 public static BlogDescriptor[] GetBlogs(bool sortByName)
 {
     string[]         ids   = GetBlogIds();
     BlogDescriptor[] blogs = new BlogDescriptor[ids.Length];
     for (int i = 0; i < ids.Length; i++)
     {
         using (BlogSettings settings = BlogSettings.ForBlogId(ids[i]))
             blogs[i] = new BlogDescriptor(ids[i], settings.BlogName, settings.HomepageUrl);
     }
     if (sortByName)
     {
         Array.Sort(blogs, new BlogDescriptor.Comparer());
     }
     return(blogs);
 }