using System; using System.Collections.Generic; using System.Linq; namespace Umbraco.Core.Models.PublishedContent { /// /// Represents an ordered set of . /// /// The type of content. public class PublishedContentOrderedSet : PublishedContentSet, IOrderedEnumerable where T : class, IPublishedContent { // ReSharper disable ParameterTypeCanBeEnumerable.Local internal PublishedContentOrderedSet(IOrderedEnumerable content) // ReSharper restore ParameterTypeCanBeEnumerable.Local : base(content) { } // note: because we implement IOrderedEnumerable, we don't need to implement the ThenBy nor // ThenByDescending methods here, only CreateOrderedEnumerable and that does it. #region IOrderedEnumerable public IOrderedEnumerable CreateOrderedEnumerable(Func keySelector, IComparer comparer, bool descending) { return new PublishedContentOrderedSet(((IOrderedEnumerable)Source).CreateOrderedEnumerable(keySelector, comparer, descending)); } #endregion } }