Ejemplo n.º 1
0
 public ItemVersion(ItemVersions container, CrawlType crawlType, DateTime asOfDate)
 {
     this.LocationType = container.LocationType;
     this.Name         = container.Name;
     this.CrawlType    = crawlType;
     this.AsOfDate     = asOfDate;
 }
Ejemplo n.º 2
0
        public void Merge(ItemVersions other)
        {
            if (this.LocationType != other.LocationType || this.Name != other.Name)
            {
                throw new ArgumentException();
            }

            HashSet <ItemVersion> allVersions = new HashSet <ItemVersion>(this.Versions);

            allVersions.UnionWith(other.Versions);
            this.Versions = new List <ItemVersion>(allVersions.OrderByDescending((v) => v.AsOfDate));
        }