コード例 #1
0
ファイル: Episode.cs プロジェクト: robertiagar/podcastr
 public Episode(System.Xml.Linq.XElement element, Podcast podcast)
 {
     XNamespace itunes = "http://www.itunes.com/dtds/podcast-1.0.dtd";
     Name = element.Element("title").Value;
     WebPath = element.Element("enclosure").Attribute("url").Value;
     Author = element.Element(itunes + "author").Value;
     Published = ToDateTime(element.Element("pubDate").Value);
     ImageUrl = element.Element(itunes + "image") != null ? element.Element(itunes + "image").Attribute("href").Value : podcast.ImageUrl;
     Summary = element.Element(itunes + "summary") != null ? element.Element(itunes + "summary").Value : null;
     Description = element.Element("description") != null ? element.Element("description").Value : null;
     Podcast = podcast;
 }
コード例 #2
0
        public Episode(System.Xml.Linq.XElement element, Podcast podcast)
        {
            XNamespace itunes = "http://www.itunes.com/dtds/podcast-1.0.dtd";

            Name      = element.Element("title").Value;
            WebPath   = element.Element("enclosure").Attribute("url").Value;
            Author    = element.Element(itunes + "author").Value;
            Published = ToDateTime(element.Element("pubDate").Value);
            ImageUrl  = element.Element(itunes + "image") != null?element.Element(itunes + "image").Attribute("href").Value : podcast.ImageUrl;

            Summary = element.Element(itunes + "summary") != null?element.Element(itunes + "summary").Value : null;

            Description = element.Element("description") != null?element.Element("description").Value : null;

            Podcast = podcast;
        }