コード例 #1
0
        void IFlickrParsable.Load(XmlReader reader)
        {
            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.LocalName)
                {
                case "set":
                    ContextSet set = new ContextSet();
                    set.PhotosetId = reader.GetAttribute("id");
                    set.Title      = reader.GetAttribute("title");
                    Sets.Add(set);
                    reader.Read();
                    break;

                case "pool":
                    ContextGroup group = new ContextGroup();
                    group.GroupId = reader.GetAttribute("id");
                    group.Title   = reader.GetAttribute("title");
                    Groups.Add(group);
                    reader.Read();
                    break;

                default:
                    break;
                }
            }
        }
コード例 #2
0
 void IFlickrParsable.Load(XmlReader reader)
 {
     while (reader.NodeType != XmlNodeType.EndElement)
     {
         switch (reader.LocalName)
         {
             case "set":
                 ContextSet set = new ContextSet();
                 set.PhotosetId = reader.GetAttribute("id");
                 set.Title = reader.GetAttribute("title");
                 Sets.Add(set);
                 reader.Read();
                 break;
             case "pool":
                 ContextGroup group = new ContextGroup();
                 group.GroupId = reader.GetAttribute("id");
                 group.Title = reader.GetAttribute("title");
                 Groups.Add(group);
                 reader.Read();
                 break;
             default:
                 break;
         }
     }
 }