4 using System.Collections.Generic;
6 namespace SiliconStudio.Presentation.Core
12 public class AnonymousEqualityComparer<T> : IEqualityComparer<T>
14 private readonly Func<T, T, bool> equals;
15 private readonly Func<T, int> getHashCode;
24 if (equals == null)
throw new ArgumentNullException(
"equals");
25 if (getHashCode == null)
throw new ArgumentNullException(
"getHashCode");
27 this.getHashCode = getHashCode;
35 : this(equals, obj => obj.GetHashCode())
48 return getHashCode(obj);
_In_ size_t _In_ DXGI_FORMAT _In_ size_t _In_ float size_t y
AnonymousEqualityComparer(Func< T, T, bool > equals, Func< T, int > getHashCode)
Initializes a new instance of the AnonymousEqualityComparer{T} class.
AnonymousEqualityComparer(Func< T, T, bool > equals)
Initializes a new instance of the AnonymousEqualityComparer{T} class using the default object...