public MtCategory[] GetCategoryList(string blogid, string username, string password)
{
ValidateUser(username,password,Config.CurrentBlog.AllowServiceAccess);
ICollection<LinkCategory> lcc = Links.GetCategories(CategoryType.PostCollection, ActiveFilter.None);
if(lcc == null)
{
throw new XmlRpcFaultException(0, "No categories exist");
}
MtCategory[] categories = new MtCategory[lcc.Count];
int i = 0;
foreach(LinkCategory linkCategory in lcc)
{
MtCategory _category = new MtCategory(linkCategory.Id.ToString(CultureInfo.InvariantCulture), linkCategory.Title);
categories[i] = _category;
i++;
}
return categories;
}