Esempio n. 1
0
        /// <nodoc />
        public static ContentLocationEntry MergeEntries(ContentLocationEntry entry1, ContentLocationEntry entry2)
        {
            if (entry1 == null || entry1.IsMissing)
            {
                return(entry2);
            }

            if (entry2 == null || entry2.IsMissing)
            {
                return(entry1);
            }

            return(new ContentLocationEntry(
                       entry1.Locations.SetExistence(entry2.Locations, true),
                       entry1.ContentSize,
                       UnixTime.Min(entry1.LastAccessTimeUtc, entry2.LastAccessTimeUtc),
                       UnixTime.Min(entry1.CreationTimeUtc, entry2.CreationTimeUtc)));
        }