diff --git a/ICD.Common.Utils/Extensions/ListExtensions.cs b/ICD.Common.Utils/Extensions/ListExtensions.cs
index 68642f9..50c28c7 100644
--- a/ICD.Common.Utils/Extensions/ListExtensions.cs
+++ b/ICD.Common.Utils/Extensions/ListExtensions.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using ICD.Common.Properties;
+using ICD.Common.Utils.Comparers;
namespace ICD.Common.Utils.Extensions
{
@@ -50,6 +51,30 @@ namespace ICD.Common.Utils.Extensions
items.ForEach(i => extends.AddSorted(i, comparer));
}
+ ///
+ /// Adds the items into a sorted list.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [PublicAPI]
+ public static void AddSorted(this List extends, IEnumerable items, Func predicate)
+ {
+ if (extends == null)
+ throw new ArgumentNullException("extends");
+
+ if (items == null)
+ throw new ArgumentNullException("items");
+
+ if (predicate == null)
+ throw new ArgumentNullException("predicate");
+
+ PredicateComparer comparer = new PredicateComparer(predicate);
+ extends.AddSorted(items, comparer);
+ }
+
///
/// Adds the item into a sorted list.
///
@@ -106,6 +131,27 @@ namespace ICD.Common.Utils.Extensions
extends.Insert(index, item);
}
+ ///
+ /// Adds the item into a sorted list.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [PublicAPI]
+ public static void AddSorted(this List extends, T item, Func predicate)
+ {
+ if (extends == null)
+ throw new ArgumentNullException("extends");
+
+ if (predicate == null)
+ throw new ArgumentNullException("predicate");
+
+ PredicateComparer comparer = new PredicateComparer(predicate);
+ extends.AddSorted(item, comparer);
+ }
+
///
/// Pads the list to the given total length.
///