public TItem(TItem item) { Link = new TUri(item.Link); Title = item.Title; Description = item.Description; PubDate = item.PubDate; Enclosure = new TEnclosure(item.Enclosure); IsRead = item.IsRead; }
public TItem() { Link = new TUri(); Title = ""; Description = ""; PubDate = DateTime.MinValue; Enclosure = new TEnclosure(); IsRead = false; }
public TEnclosure(TEnclosure enclosure) : this() { if (enclosure != null) { Url = new TUri(enclosure.Url); Length = enclosure.Length; Mimetype = enclosure.Mimetype; } }
public TItem(XElement item) { Link = new TUri(item.SafeReadElementValue <string>("link", "")); Title = item.SafeReadElementValue <string>("title", ""); Description = item.SafeReadElementValue <string>("description", ""); PubDate = item.SafeReadElementValue <DateTime>("pubDate", DateTime.MinValue, CultureInfo.InvariantCulture); if (item.Attributes().Any(x => x.Name == "isread")) { IsRead = item.SafeReadAttribute <bool>("isread", false); } if (item.Elements().Any(x => x.Name == "enclosure")) { Enclosure = new TEnclosure(item.SafeReadElement("enclosure")); } }