diff --git a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs
index df1cac4..2fc8418 100644
--- a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs
+++ b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs
@@ -966,6 +966,52 @@ namespace ICD.Common.Utils.Extensions
return output;
}
+ ///
+ /// Returns true if all of the items in the sequence are equal, or the sequence is empty.
+ ///
+ ///
+ ///
+ ///
+ public static bool IsDistinct([NotNull] this IEnumerable extends)
+ {
+ if (extends == null)
+ throw new ArgumentNullException("extends");
+
+ IEqualityComparer comparer = EqualityComparer.Default;
+ return extends.IsDistinct(comparer);
+ }
+
+ ///
+ /// Returns true if all of the items in the sequence are equal, or the sequence is empty.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsDistinct([NotNull] this IEnumerable extends, [NotNull] IEqualityComparer comparer)
+ {
+ if (extends == null)
+ throw new ArgumentNullException("extends");
+
+ TItem other = default(TItem);
+ bool first = true;
+
+ foreach (TItem item in extends)
+ {
+ if (first)
+ {
+ other = item;
+ first = false;
+ continue;
+ }
+
+ if (!comparer.Equals(item, other))
+ return false;
+ }
+
+ return true;
+ }
+
///
/// Gets distinct elements from the sequence based on given property.
///