Beispiel #1
0
        public ReadOnlyCollection <Tag> GetAll()
        {
            var xmlResponse = connection.GetXmlDocument(TagQuery.All());
            var tags        = (from tag in xmlResponse.Descendants("tag")
                               select new Tag
            {
                Name = tag.Attribute("tag").Value,
                Count = Convert.ToInt32(tag.Attribute("count").Value)
            }).ToList <Tag>();

            return(new ReadOnlyCollection <Tag>(tags));
        }