void IFlickrParsable.Load(System.Xml.XmlReader reader) { if (reader.LocalName != "count" && !reader.ReadToFollowing("count")) { UtilityMethods.CheckParsingException(reader); return; } Count = reader.ReadElementContentAsInt(); if (reader.LocalName != "prevphotos") { reader.ReadToFollowing("prevphotos"); } reader.ReadToDescendant("photo"); while (reader.LocalName == "photo") { FavoriteContextPhoto photo = new FavoriteContextPhoto(); ((IFlickrParsable)photo).Load(reader); PreviousPhotos.Add(photo); } if (reader.LocalName != "nextphotos") { reader.ReadToFollowing("nextphotos"); } reader.ReadToDescendant("photo"); while (reader.LocalName == "photo") { FavoriteContextPhoto photo = new FavoriteContextPhoto(); ((IFlickrParsable)photo).Load(reader); NextPhotos.Add(photo); } }
void IFlickrParsable.Load(System.Xml.XmlReader reader) { if (reader.LocalName != "count" && !reader.ReadToFollowing("count")) { UtilityMethods.CheckParsingException(reader); return; } Count = reader.ReadElementContentAsInt(); if( reader.LocalName != "prevphotos" ) reader.ReadToFollowing("prevphotos"); reader.ReadToDescendant("photo"); while (reader.LocalName == "photo") { FavoriteContextPhoto photo = new FavoriteContextPhoto(); ((IFlickrParsable)photo).Load(reader); PreviousPhotos.Add(photo); } if (reader.LocalName != "nextphotos") reader.ReadToFollowing("nextphotos"); reader.ReadToDescendant("photo"); while (reader.LocalName == "photo") { FavoriteContextPhoto photo = new FavoriteContextPhoto(); ((IFlickrParsable)photo).Load(reader); NextPhotos.Add(photo); } }
void IFlickrParsable.Load(XmlReader reader) { if (reader.LocalName != "count" && !reader.ReadToFollowing("count")) return; this.Count = reader.ReadElementContentAsInt(); if (reader.LocalName != "prevphotos") reader.ReadToFollowing("prevphotos"); reader.ReadToDescendant("photo"); while (reader.LocalName == "photo") { FavoriteContextPhoto favoriteContextPhoto = new FavoriteContextPhoto(); favoriteContextPhoto.Load(reader); this.PreviousPhotos.Add(favoriteContextPhoto); } if (reader.LocalName != "nextphotos") reader.ReadToFollowing("nextphotos"); reader.ReadToDescendant("photo"); while (reader.LocalName == "photo") { FavoriteContextPhoto favoriteContextPhoto = new FavoriteContextPhoto(); favoriteContextPhoto.Load(reader); this.NextPhotos.Add(favoriteContextPhoto); } }