Exemple #1
0
        /// <summary>
        /// Creates a new equality comparer.
        /// </summary>
        public DelegateEqualityComparer(GetHashCodeDelegate hashCodeDelegate, EqualsDelegate equalsDelegate)
        {
            if (hashCodeDelegate == null)
            {
                throw new ArgumentNullException("hashCodeDelegate");
            }
            if (equalsDelegate == null)
            {
                throw new ArgumentNullException("equalsDelegate");
            }

            _equalsDelegate   = equalsDelegate;
            _hashCodeDelegate = hashCodeDelegate;
        }
Exemple #2
0
 public DynamicEqualityComparer(EqualsDelegate <T> equalityMethod, GetHashCodeDelegate <T> hashcodeMethod)
 {
     EqualityMethod    = equalityMethod;
     GetHashCodeMethod = hashcodeMethod;
 }