Skip to content

Commit

Permalink
Remove duplicate extension method for ValueArray<T> that is already p…
Browse files Browse the repository at this point in the history
…resent on the SDK.
  • Loading branch information
Robbware committed Nov 28, 2023
1 parent 51e62d5 commit 069ecfe
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions COMET.Web.Common/Extensions/ValueArrayExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,6 @@ namespace COMET.Web.Common.Extensions
/// </summary>
public static class ValueArrayExtensions
{
/// <summary>
/// Checks if two <see cref="ValueArray{T}"/> contains the same exact values
/// </summary>
/// <typeparam name="T">the type of the parameter</typeparam>
/// <param name="valueArray">the first value array to compare</param>
/// <param name="comparison">the second value array to compare</param>
/// <returns>True if the contained values are the same, false otherwise</returns>
public static bool ContainsSameValues<T>(this ValueArray<T> valueArray, ValueArray<T> comparison) where T : class
{
if (comparison is null)
{
throw new ArgumentNullException(nameof(comparison));
}

if (valueArray.Count != comparison.Count)
{
return false;
}

return !valueArray.Where((t, i) => !t.Equals(comparison[i])).Any();
}

/// <summary>
/// Adds new default values inside a <see cref="ValueArray{T}"/>
/// </summary>
Expand Down

0 comments on commit 069ecfe

Please sign in to comment.