diff --git a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs index 2735f04..59bf4a9 100644 --- a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs +++ b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs @@ -508,6 +508,24 @@ namespace ICD.Common.Utils.Extensions return extends.OrderBy(i => i); } + /// + /// Shorthand for ordering the given sequence with the given comparer. + /// + /// + /// + /// + /// + public static IEnumerable OrderBy(this IEnumerable extends, IComparer comparer) + { + if (extends == null) + throw new ArgumentNullException("extends"); + + if (comparer == null) + throw new ArgumentNullException("comparer"); + + return extends.OrderBy(i => i, comparer); + } + /// /// Returns every item in the sequence except the given item. ///