void IFlickrParsable.Load(System.Xml.XmlReader reader) { reader.Read(); while (reader.LocalName != "auth" && reader.LocalName != "oauth") { switch (reader.LocalName) { case "token": Token = reader.ReadElementContentAsString(); break; case "perms": Permissions = (AuthLevel)Enum.Parse(typeof(AuthLevel), reader.ReadElementContentAsString(), true); break; case "user": User = new FoundUser(); ((IFlickrParsable)User).Load(reader); break; default: UtilityMethods.CheckParsingException(reader); reader.Skip(); break; } } }