Esempio n. 1
0
        /// <summary>
        /// This takes an existing package object and creates a package model from it and inserts it into the feed.
        /// </summary>
        /// <param name="package"></param>
        /// <returns></returns>
        public AtomItem Add(Package package)
        {
            var item = new AtomItem(package);

            Items = Items.Union(item.SingleItemAsEnumerable()).ToArray();
            return(item);
        }
Esempio n. 2
0
 public AtomItem Add(AtomItem item)
 {
     lock (this) {
         Items = Items.Where(each => each.Id != item.Id).Union(item.SingleItemAsEnumerable()).ToArray();
         return(item);
     }
 }
Esempio n. 3
0
 /// <summary>
 ///   This adds a new package model to the feed. The package model doesn't have to be completed when added, but the caller must fill in the values before the feed is generated, or it's kinda pointless. :) Use this when trying to create feeds.
 /// </summary>
 /// <param name="model"> </param>
 /// <returns> </returns>
 public AtomItem Add(PackageModel model)
 {
     lock (this) {
         var item = new AtomItem(model);
         Items = Items.Where(each => each.Id != item.Id).Union(item.SingleItemAsEnumerable()).ToArray();
         return(item);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// This takes an existing package object and creates a package model from it and inserts it into the feed.
 /// </summary>
 /// <param name="package"></param>
 /// <returns></returns>
 public AtomItem Add(Package package)
 {
     var item = new AtomItem(package);
     Items = Items.Union(item.SingleItemAsEnumerable()).ToArray();
     return item;
 }
Esempio n. 5
0
 public AtomItem Add(AtomItem item)
 {
     lock (this) {
         Items = Items.Where(each => each.Id != item.Id).Union(item.SingleItemAsEnumerable()).ToArray();
         return item;
     }
 }
Esempio n. 6
0
 /// <summary>
 ///   This adds a new package model to the feed. The package model doesn't have to be completed when added, but the caller must fill in the values before the feed is generated, or it's kinda pointless. :) Use this when trying to create feeds.
 /// </summary>
 /// <param name="model"> </param>
 /// <returns> </returns>
 public AtomItem Add(PackageModel model)
 {
     lock (this) {
         var item = new AtomItem(model);
         Items = Items.Where(each => each.Id != item.Id).Union(item.SingleItemAsEnumerable()).ToArray();
         return item;
     }
 }