Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public TItem()
 {
     Link        = new TUri();
     Title       = "";
     Description = "";
     PubDate     = DateTime.MinValue;
     Enclosure   = new TEnclosure();
     IsRead      = false;
 }
Ejemplo n.º 3
0
 public TEnclosure(TEnclosure enclosure)
     : this()
 {
     if (enclosure != null)
     {
         Url      = new TUri(enclosure.Url);
         Length   = enclosure.Length;
         Mimetype = enclosure.Mimetype;
     }
 }
Ejemplo n.º 4
0
 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"));
     }
 }