コード例 #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));
 }