Provides details of a particular group.
Used by Flickr.GroupsBrowse() and Flickr.GroupsBrowse(string).
Ejemplo n.º 1
0
        void IFlickrParsable.Load(System.Xml.XmlReader reader)
        {
            if (reader.LocalName != "category")
                UtilityMethods.CheckParsingException(reader);

            while (reader.MoveToNextAttribute())
            {
                switch (reader.LocalName)
                {
                    case "name":
                        CategoryName = reader.Value;
                        break;
                    case "path":
                        Path = reader.Value;
                        break;
                    case "pathids":
                        PathIds = reader.Value;
                        break;
                    default:
                        UtilityMethods.CheckParsingException(reader);
                        break;

                }
            }

            reader.Read();

            while (reader.LocalName == "subcat" || reader.LocalName == "group")
            {
                if (reader.LocalName == "subcat")
                {
                    Subcategory c = new Subcategory();
                    ((IFlickrParsable)c).Load(reader);
                    Subcategories.Add(c);

                }
                else
                {
                    Group s = new Group();
                    ((IFlickrParsable)s).Load(reader);
                    Groups.Add(s);
                }
            }

            // Skip to next element (if any)
            reader.Skip();
        }
Ejemplo n.º 2
0
 void IFlickrParsable.Load(XmlReader reader)
 {
     if (!(reader.LocalName != "category"))
     ;
       while (reader.MoveToNextAttribute())
       {
     switch (reader.LocalName)
     {
       case "name":
     this.CategoryName = reader.Value;
     continue;
       case "path":
     this.Path = reader.Value;
     continue;
       case "pathids":
     this.PathIds = reader.Value;
     continue;
       default:
     continue;
     }
       }
       reader.Read();
       while (reader.LocalName == "subcat" || reader.LocalName == "group")
       {
     if (reader.LocalName == "subcat")
     {
       Subcategory subcategory = new Subcategory();
       subcategory.Load(reader);
       this.Subcategories.Add(subcategory);
     }
     else
     {
       Group group = new Group();
       ((IFlickrParsable) group).Load(reader);
       this.Groups.Add(group);
     }
       }
       reader.Skip();
 }