示例#1
0
        private TwitterUser ParseUserNode(XmlNode Element)
        {
            if (Element == null)
            {
                return(null);
            }

            TwitterUser User = new TwitterUser();

            User.ID          = int.Parse(Element["id"].InnerText);
            User.UserName    = Element["name"].InnerText;
            User.ScreenName  = Element["screen_name"].InnerText;
            User.Location    = Element["location"].InnerText;
            User.Description = Element["description"].InnerText;
            if (Element["profile_image_url"].InnerText != string.Empty)
            {
                User.ProfileImageUri = new Uri(Element["profile_image_url"].InnerText);
            }
            if (Element["url"].InnerText != string.Empty)
            {
                User.ProfileUri = new Uri(Element["url"].InnerText);
            }
            User.IsProtected       = bool.Parse(Element["protected"].InnerText);
            User.NumberOfFollowers = int.Parse(Element["followers_count"].InnerText);

            if (Element["friends_count"] != null)
            {
                User.Friends_count = int.Parse(Element["friends_count"].InnerText);
            }
            else
            {
                User.Friends_count = -1;        // flag that we don't know, which is different than having zero friends
            }
            if (Element["status"] != null)
            {
                User.Status = ParseStatusNode(Element["status"]);
            }

            return(User);
        }
示例#2
0
 public bool Contains(TwitterUser value)
 {
     return(List.Contains(value));
 }
示例#3
0
 public void Remove(TwitterUser value)
 {
     List.Remove(value);
 }
示例#4
0
 public void Insert(int index, TwitterUser value)
 {
     List.Insert(index, value);
 }
示例#5
0
 public int IndexOf(TwitterUser value)
 {
     return(List.IndexOf(value));
 }
示例#6
0
 public int Add(TwitterUser value)
 {
     return(List.Add(value));
 }