Beispiel #1
0
 public virtual void CopyValues(FeedItem n)
 {
     this.Author = n.Author;
     if (n.Category != null) {
         this.Category = new Category();
         this.Category.Domain = n.Category.Domain;
         this.Category.Name = n.Category.Name;
     } else {
         this.Category = null;
     }
     this.Comments = n.Comments;
     this.Description = n.Description;
     if (n.Enclosure != null) {
         this.Enclosure = new Enclosure();
         this.Enclosure.Length = n.Enclosure.Length;
         this.Enclosure.Type = n.Enclosure.Type;
         this.Enclosure.Url = n.Enclosure.Url;
     } else {
         this.Enclosure = null;
     }
     this.GUID = n.GUID;
     this.InsertDate = n.InsertDate;
     this.Link = n.Link;
     this.PublishDate = n.PublishDate;
     this.Source = n.Source;
     this.Title = n.Title;
 }
Beispiel #2
0
 public void CopyValues(Feed original)
 {
     if (original.Category != null) {
         this.Category = new Category();
         this.Category.Domain = original.Category.Domain;
         this.Category.Name = original.Category.Name;
     } else {
         this.Category = null;
     }
     this.Description = original.Description;
     this.Copyright = original.Copyright;
     this.Documentation = original.Documentation;
     this.Generator = original.Generator;
     if (original.Image != null) {
         this.Image = new Image();
         this.Image.Description = original.Image.Description;
         this.Image.Height = original.Image.Height;
         this.Image.Link = original.Image.Link;
         this.Image.Title = original.Image.Title;
         this.Image.URL = original.Image.URL;
         this.Image.Width = original.Image.Width;
     } else {
         this.Image = null;
     }
     if (original.Items != null) {
         this.Items = new List<FeedItem>();
         foreach (FeedItem item in original.Items) {
             FeedItem newItem = new FeedItem();
             newItem.CopyValues(item);
             this.Items.Add(newItem);
         }
     } else {
         this.Items = null;
     }
     this.Language = original.Language;
     this.LastBuildDate = original.LastBuildDate;
     this.Link = original.Link;
     this.ManagingEditor = original.ManagingEditor;
     this.Name = original.Name;
     this.PublishDate = original.PublishDate;
     this.Rating = original.Rating;
     this.Skipdays = MyHelper.EnumToArray(original.Skipdays);
     this.Skiphours = MyHelper.EnumToArray(original.Skiphours);
     this.Title = original.Title;
     this.Ttl = original.Ttl;
     this.Webmaster = original.Webmaster;
 }