public TwitterMessage(XElement element) { ActualId = Convert.ToInt64(element.Element("id").Value); if (element.Element("retweeted_status") != null) { RetweetUser = new TwitterUser(element.Element("user")); element = element.Element("retweeted_status"); IsRetweet = true; } CreatedAt = DateTime.ParseExact(element.Element("created_at").Value, "ddd MMM dd HH:mm:ss +0000 yyyy", CultureInfo.InvariantCulture); CreatedAt = CreatedAt.ToLocalTime(); Text = HttpUtility.HtmlDecode(element.Element("text").Value); Id = Convert.ToInt64(element.Element("id").Value); IsFavourite = element.Element("favorited").Value == "true"; if (element.Element("in_reply_to_status_id").Value != "") { InReplyToId = Convert.ToInt64(element.Element("in_reply_to_status_id").Value); InReplyToUserId = Convert.ToInt64(element.Element("in_reply_to_user_id").Value); InReplyToScreenName = element.Element("in_reply_to_screen_name").Value; } User = new TwitterUser(element.Element("user")); }