예제 #1
0
 public void AddPermalink(Uri permalink)
 {
     if (permalink == null)
     {
         throw new ArgumentNullException(nameof(permalink));
     }
     Id = permalink.AbsoluteUri;
     Links.Add(SyndicationLink.CreateAlternateLink(permalink));
 }
예제 #2
0
 public void AddPermalink(Uri permalink)
 {
     if (permalink == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("permalink");
     }
     this.Id = permalink.AbsoluteUri;
     this.Links.Add(SyndicationLink.CreateAlternateLink(permalink));
 }
예제 #3
0
 public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime)
 {
     if (title != null)
     {
         this.Title = new TextSyndicationContent(title);
     }
     _content = content;
     if (itemAlternateLink != null)
     {
         this.Links.Add(SyndicationLink.CreateAlternateLink(itemAlternateLink));
     }
     _id = id;
     _lastUpdatedTime = lastUpdatedTime;
 }
예제 #4
0
 public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (title != null)
     {
         this.Title = new TextSyndicationContent(title);
     }
     this.content = content;
     if (itemAlternateLink != null)
     {
         this.Links.Add(SyndicationLink.CreateAlternateLink(itemAlternateLink));
     }
     this.id = id;
     this.lastUpdatedTime = lastUpdatedTime;
 }
예제 #5
0
 public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id,
                        DateTimeOffset lastUpdatedTime, IEnumerable <SyndicationItem> items)
 {
     Title       = title != null ? new TextSyndicationContent(title) : null;
     Description = description != null ? new TextSyndicationContent(description) : null;
     if (feedAlternateLink != null)
     {
         Links.Add(SyndicationLink.CreateAlternateLink(feedAlternateLink));
     }
     Id = id;
     LastUpdatedTime = lastUpdatedTime;
     if (items != null)
     {
         Items = items;
     }
 }
예제 #6
0
 public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable <SyndicationItem> items)
 {
     if (title != null)
     {
         _title = new TextSyndicationContent(title);
     }
     if (description != null)
     {
         _description = new TextSyndicationContent(description);
     }
     if (feedAlternateLink != null)
     {
         this.Links.Add(SyndicationLink.CreateAlternateLink(feedAlternateLink));
     }
     _id = id;
     _lastUpdatedTime = lastUpdatedTime;
     _items           = items;
 }
 public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable <SyndicationItem> items)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (title != null)
     {
         this.title = new TextSyndicationContent(title);
     }
     if (description != null)
     {
         this.description = new TextSyndicationContent(description);
     }
     if (feedAlternateLink != null)
     {
         this.Links.Add(SyndicationLink.CreateAlternateLink(feedAlternateLink));
     }
     this.id = id;
     this.lastUpdatedTime = lastUpdatedTime;
     this.items           = items;
 }