public JsonSyndicationFeed(SyndicationFeed feed)
 {
     if (feed != null)
     {
         if ((feed.Authors != null) && (feed.Authors.Count > 0))
         {
             this.Authors = new Collection <JsonSyndicationPerson>();
             foreach (SyndicationPerson author in feed.Authors)
             {
                 this.Authors.Add(new JsonSyndicationPerson(author));
             }
         }
         this.BaseUri = feed.BaseUri;
         if ((feed.Categories != null) && (feed.Categories.Count > 0))
         {
             this.Categories = new Collection <JsonSyndicationCategory>();
             foreach (SyndicationCategory category in feed.Categories)
             {
                 this.Categories.Add(new JsonSyndicationCategory(category));
             }
         }
         if ((feed.Contributors != null) && (feed.Contributors.Count > 0))
         {
             this.Contributors = new Collection <JsonSyndicationPerson>();
             foreach (SyndicationPerson contributor in feed.Contributors)
             {
                 this.Contributors.Add(new JsonSyndicationPerson(contributor));
             }
         }
         this.Copyright   = new JsonSyndicationContent(feed.Copyright);
         this.Description = new JsonSyndicationContent(feed.Description);
         this.Generator   = feed.Generator;
         this.Id          = feed.Id;
         this.ImageUrl    = feed.ImageUrl;
         if (feed.Items != null)
         {
             this.Items = new Collection <JsonSyndicationItem>();
             foreach (SyndicationItem item in feed.Items)
             {
                 this.Items.Add(new JsonSyndicationItem(item));
             }
         }
         this.Language        = feed.Language;
         this.LastUpdatedTime = feed.LastUpdatedTime.DateTime;
         if ((feed.Links != null) && (feed.Links.Count > 0))
         {
             this.Links = new Collection <JsonSyndicationLink>();
             foreach (SyndicationLink link in feed.Links)
             {
                 this.Links.Add(new JsonSyndicationLink(link));
             }
         }
         this.Title = new JsonSyndicationContent(feed.Title);
     }
 }
示例#2
0
 public JsonSyndicationItem(SyndicationItem item)
 {
     if (item != null)
     {
         if ((item.Authors != null) && (item.Authors.Count > 0))
         {
             this.Authors = new Collection <JsonSyndicationPerson>();
             foreach (SyndicationPerson author in item.Authors)
             {
                 this.Authors.Add(new JsonSyndicationPerson(author));
             }
         }
         this.BaseUri = item.BaseUri;
         if ((item.Categories != null) && (item.Categories.Count > 0))
         {
             this.Categories = new Collection <JsonSyndicationCategory>();
             foreach (SyndicationCategory category in item.Categories)
             {
                 this.Categories.Add(new JsonSyndicationCategory(category));
             }
         }
         this.Content = new JsonSyndicationContent(item.Content);
         if ((item.Contributors != null) && (item.Contributors.Count > 0))
         {
             this.Contributors = new Collection <JsonSyndicationPerson>();
             foreach (SyndicationPerson contributor in item.Contributors)
             {
                 this.Contributors.Add(new JsonSyndicationPerson(contributor));
             }
         }
         this.Copyright       = new JsonSyndicationContent(item.Copyright);
         this.Id              = item.Id;
         this.LastUpdatedTime = item.LastUpdatedTime.DateTime;
         if ((item.Links != null) && (item.Links.Count > 0))
         {
             this.Links = new Collection <JsonSyndicationLink>();
             foreach (SyndicationLink link in item.Links)
             {
                 this.Links.Add(new JsonSyndicationLink(link));
             }
         }
         this.PublishDate = item.PublishDate.DateTime;
         this.Summary     = new JsonSyndicationContent(item.Summary);
         this.Title       = new JsonSyndicationContent(item.Title);
     }
 }
示例#3
0
 public JsonSyndicationItem(Collection <JsonSyndicationPerson> authors, Uri baseUri,
                            Collection <JsonSyndicationCategory> categories, JsonSyndicationContent content,
                            Collection <JsonSyndicationPerson> contributors, JsonSyndicationContent copyright,
                            string id, DateTime lastUpdatedTime, Collection <JsonSyndicationLink> links,
                            DateTime publishDate, JsonSyndicationContent summary, JsonSyndicationContent title)
 {
     this.Authors         = authors;
     this.BaseUri         = baseUri;
     this.Categories      = categories;
     this.Content         = content;
     this.Contributors    = contributors;
     this.Copyright       = copyright;
     this.Id              = id;
     this.LastUpdatedTime = lastUpdatedTime;
     this.Links           = links;
     this.PublishDate     = publishDate;
     this.Summary         = summary;
     this.Title           = title;
 }
 public JsonSyndicationItem(Collection<JsonSyndicationPerson> authors, Uri baseUri,
     Collection<JsonSyndicationCategory> categories, JsonSyndicationContent content,
     Collection<JsonSyndicationPerson> contributors, JsonSyndicationContent copyright,
     string id, DateTime lastUpdatedTime, Collection<JsonSyndicationLink> links,
     DateTime publishDate, JsonSyndicationContent summary, JsonSyndicationContent title)
 {
     this.Authors = authors;
     this.BaseUri = baseUri;
     this.Categories = categories;
     this.Content = content;
     this.Contributors = contributors;
     this.Copyright = copyright;
     this.Id = id;
     this.LastUpdatedTime = lastUpdatedTime;
     this.Links = links;
     this.PublishDate = publishDate;
     this.Summary = summary;
     this.Title = title;
 }
 public JsonSyndicationFeed(Collection <JsonSyndicationPerson> authors, Uri baseUri,
                            Collection <JsonSyndicationCategory> categories, Collection <JsonSyndicationPerson> contributors,
                            JsonSyndicationContent copyright, JsonSyndicationContent description,
                            string generator, string id, Uri imageUrl, Collection <JsonSyndicationItem> items,
                            string language, DateTime lastUpdatedTime, Collection <JsonSyndicationLink> links,
                            JsonSyndicationContent title)
 {
     this.Authors         = authors;
     this.BaseUri         = baseUri;
     this.Categories      = categories;
     this.Contributors    = contributors;
     this.Copyright       = copyright;
     this.Description     = description;
     this.Generator       = generator;
     this.Id              = id;
     this.ImageUrl        = imageUrl;
     this.Items           = items;
     this.Language        = language;
     this.LastUpdatedTime = lastUpdatedTime;
     this.Links           = links;
     this.Title           = title;
 }
 public JsonSyndicationFeed(Collection<JsonSyndicationPerson> authors, Uri baseUri,
     Collection<JsonSyndicationCategory> categories, Collection<JsonSyndicationPerson> contributors,
     JsonSyndicationContent copyright, JsonSyndicationContent description,
     string generator, string id, Uri imageUrl, Collection<JsonSyndicationItem> items,
     string language, DateTime lastUpdatedTime, Collection<JsonSyndicationLink> links,
     JsonSyndicationContent title)
 {
     this.Authors = authors;
     this.BaseUri = baseUri;
     this.Categories = categories;
     this.Contributors = contributors;
     this.Copyright = copyright;
     this.Description = description;
     this.Generator = generator;
     this.Id = id;
     this.ImageUrl = imageUrl;
     this.Items = items;
     this.Language = language;
     this.LastUpdatedTime = lastUpdatedTime;
     this.Links = links;
     this.Title = title;
 }
 public JsonSyndicationItem(SyndicationItem item)
 {
     if (item != null)
     {
         if ((item.Authors != null) && (item.Authors.Count > 0))
         {
             this.Authors = new Collection<JsonSyndicationPerson>();
             foreach (SyndicationPerson author in item.Authors)
             {
                 this.Authors.Add(new JsonSyndicationPerson(author));
             }
         }
         this.BaseUri = item.BaseUri;
         if ((item.Categories != null) && (item.Categories.Count > 0))
         {
             this.Categories = new Collection<JsonSyndicationCategory>();
             foreach (SyndicationCategory category in item.Categories)
             {
                 this.Categories.Add(new JsonSyndicationCategory(category));
             }
         }
         this.Content = new JsonSyndicationContent(item.Content);
         if ((item.Contributors != null) && (item.Contributors.Count > 0))
         {
             this.Contributors = new Collection<JsonSyndicationPerson>();
             foreach (SyndicationPerson contributor in item.Contributors)
             {
                 this.Contributors.Add(new JsonSyndicationPerson(contributor));
             }
         }
         this.Copyright = new JsonSyndicationContent(item.Copyright);
         this.Id = item.Id;
         this.LastUpdatedTime = item.LastUpdatedTime.DateTime;
         if ((item.Links != null) && (item.Links.Count > 0))
         {
             this.Links = new Collection<JsonSyndicationLink>();
             foreach (SyndicationLink link in item.Links)
             {
                 this.Links.Add(new JsonSyndicationLink(link));
             }
         }
         this.PublishDate = item.PublishDate.DateTime;
         this.Summary = new JsonSyndicationContent(item.Summary);
         this.Title = new JsonSyndicationContent(item.Title);
     }
 }
 public JsonSyndicationFeed(SyndicationFeed feed)
 {
     if (feed != null)
     {
         if ((feed.Authors != null) && (feed.Authors.Count > 0))
         {
             this.Authors = new Collection<JsonSyndicationPerson>();
             foreach (SyndicationPerson author in feed.Authors)
             {
                 this.Authors.Add(new JsonSyndicationPerson(author));
             }
         }
         this.BaseUri = feed.BaseUri;
         if ((feed.Categories != null) && (feed.Categories.Count > 0))
         {
             this.Categories = new Collection<JsonSyndicationCategory>();
             foreach (SyndicationCategory category in feed.Categories)
             {
                 this.Categories.Add(new JsonSyndicationCategory(category));
             }
         }
         if ((feed.Contributors != null) && (feed.Contributors.Count > 0))
         {
             this.Contributors = new Collection<JsonSyndicationPerson>();
             foreach (SyndicationPerson contributor in feed.Contributors)
             {
                 this.Contributors.Add(new JsonSyndicationPerson(contributor));
             }
         }
         this.Copyright = new JsonSyndicationContent(feed.Copyright);
         this.Description = new JsonSyndicationContent(feed.Description);
         this.Generator = feed.Generator;
         this.Id = feed.Id;
         this.ImageUrl = feed.ImageUrl;
         if (feed.Items != null)
         {
             this.Items = new Collection<JsonSyndicationItem>();
             foreach (SyndicationItem item in feed.Items)
             {
                 this.Items.Add(new JsonSyndicationItem(item));
             }
         }
         this.Language = feed.Language;
         this.LastUpdatedTime = feed.LastUpdatedTime.DateTime;
         if ((feed.Links != null) && (feed.Links.Count > 0))
         {
             this.Links = new Collection<JsonSyndicationLink>();
             foreach (SyndicationLink link in feed.Links)
             {
                 this.Links.Add(new JsonSyndicationLink(link));
             }
         }
         this.Title = new JsonSyndicationContent(feed.Title);
     }
 }