Exemplo n.º 1
0
        private void LoadElements(System.Xml.XmlReader reader)
        {
            while (reader.LocalName != "person")
            {
                switch (reader.LocalName)
                {
                case "timezone":
                    Timezone = new Timezone();
                    ((IFlickrParsable)Timezone).Load(reader);
                    break;

                case "username":
                    UserName = reader.ReadElementContentAsString();
                    break;

                case "location":
                    Location = reader.ReadElementContentAsString();
                    break;

                case "realname":
                    RealName = reader.ReadElementContentAsString();
                    break;

                case "photosurl":
                    PhotosUrl = reader.ReadElementContentAsString();
                    break;

                case "profileurl":
                    ProfileUrl = reader.ReadElementContentAsString();
                    break;

                case "description":
                    Description = reader.ReadElementContentAsString();
                    break;

                case "mobileurl":
                    MobileUrl = reader.ReadElementContentAsString();
                    break;

                case "photos":
                    PhotosSummary = new PersonPhotosSummary();
                    ((IFlickrParsable)PhotosSummary).Load(reader);
                    break;

                case "mbox_sha1sum":
                    MailboxSha1Hash = reader.ReadElementContentAsString();
                    break;

                case "datecreate":
                    DateCreated = reader.ReadElementContentAsString();
                    break;

                default:
                    UtilityMethods.CheckParsingException(reader);
                    reader.Skip();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void LoadElements(XmlReader reader)
        {
            while (reader.LocalName != "person")
            {
                switch (reader.LocalName)
                {
                case "username":
                    UserName = reader.ReadElementContentAsString();
                    break;

                case "location":
                    Location = reader.ReadElementContentAsString();
                    break;

                case "realname":
                    RealName = reader.ReadElementContentAsString();
                    break;

                case "photosurl":
                    PhotosUrl = reader.ReadElementContentAsString();
                    break;

                case "profileurl":
                    ProfileUrl = reader.ReadElementContentAsString();
                    break;

                case "mobileurl":
                    MobileUrl = reader.ReadElementContentAsString();
                    break;

                case "photos":
                    PhotosSummary = new PersonPhotosSummary();
                    ((IFlickrParsable)PhotosSummary).Load(reader);
                    break;

                case "mbox_sha1sum":
                    MailboxSha1Hash = reader.ReadElementContentAsString();
                    break;

                case "timezone":
                    TimeZoneLabel  = reader.GetAttribute("label");
                    TimeZoneOffset = reader.GetAttribute("offset");
                    reader.Read();
                    break;

                case "description":
                    Description = reader.ReadElementContentAsString();
                    break;

                default:
                    UtilityMethods.CheckParsingException(reader);
                    reader.Skip();
                    break;
                }
            }
        }
Exemplo n.º 3
0
 private void LoadElements(System.Xml.XmlReader reader)
 {
     while (reader.LocalName != "person")
     {
         switch (reader.LocalName)
         {
             case "timezone":
                 Timezone = new Timezone();
                 ((IFlickrParsable)Timezone).Load(reader);
                 break;
             case "username":
                 UserName = reader.ReadElementContentAsString();
                 break;
             case "location":
                 Location = reader.ReadElementContentAsString();
                 break;
             case "realname":
                 RealName = reader.ReadElementContentAsString();
                 break;
             case "photosurl":
                 PhotosUrl = reader.ReadElementContentAsString();
                 break;
             case "profileurl":
                 ProfileUrl = reader.ReadElementContentAsString();
                 break;
             case "description":
                 Description = reader.ReadElementContentAsString();
                 break;
             case "mobileurl":
                 MobileUrl = reader.ReadElementContentAsString();
                 break;
             case "photos":
                 PhotosSummary = new PersonPhotosSummary();
                 ((IFlickrParsable)PhotosSummary).Load(reader);
                 break;
             case "mbox_sha1sum":
                 MailboxSha1Hash = reader.ReadElementContentAsString();
                 break;
             case "datecreate":
                 DateCreated = reader.ReadElementContentAsString();
                 break;
             default:
                 UtilityMethods.CheckParsingException(reader);
                 reader.Skip();
                 break;
         }
     }
 }
 private void LoadElements(XmlReader reader)
 {
     while (reader.LocalName != "person")
     {
         switch (reader.LocalName)
         {
             case "username":
                 UserName = reader.ReadElementContentAsString();
                 break;
             case "location":
                 Location = reader.ReadElementContentAsString();
                 break;
             case "realname":
                 RealName = reader.ReadElementContentAsString();
                 break;
             case "photosurl":
                 PhotosUrl = reader.ReadElementContentAsString();
                 break;
             case "profileurl":
                 ProfileUrl = reader.ReadElementContentAsString();
                 break;
             case "mobileurl":
                 MobileUrl = reader.ReadElementContentAsString();
                 break;
             case "photos":
                 PhotosSummary = new PersonPhotosSummary();
                 ((IFlickrParsable) PhotosSummary).Load(reader);
                 break;
             case "mbox_sha1sum":
                 MailboxSha1Hash = reader.ReadElementContentAsString();
                 break;
             case "timezone":
                 TimeZoneLabel = reader.GetAttribute("label");
                 TimeZoneOffset = reader.GetAttribute("offset");
                 reader.Read();
                 break;
             case "description":
                 Description = reader.ReadElementContentAsString();
                 break;
             default:
                 UtilityMethods.CheckParsingException(reader);
                 reader.Skip();
                 break;
         }
     }
 }