public ItemVersion(ItemVersions container, CrawlType crawlType, DateTime asOfDate) { this.LocationType = container.LocationType; this.Name = container.Name; this.CrawlType = crawlType; this.AsOfDate = asOfDate; }
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)); }