private void chain(ChainableEqualizer <T> lastEqualizer)
 {
     if (this._nextEqualizer == null)
     {
         this._nextEqualizer = lastEqualizer;
         return;
     }
     this._nextEqualizer.chain(lastEqualizer);
 }
 public ChainableEqualizer <T> Then(ChainableEqualizer <T> equalizer)
 {
     if (this._nextEqualizer != null)
     {
         this._lastEqualizer.chain(equalizer);
     }
     else
     {
         this._nextEqualizer = equalizer;
     }
     this._lastEqualizer = equalizer;
     return(this);
 }
        public bool Equals(T x, T y)
        {
            bool?nullable = ChainableEqualizer <T> .handleNulls(x, y);

            if (nullable.HasValue)
            {
                return(nullable.Value);
            }
            bool flag = this.DoEquals(x, y);

            if (this.needsToEvaluateNext(flag))
            {
                flag = this._nextEqualizer.Equals(x, y);
            }
            return(flag);
        }
 public static ChainableEqualizer <T> Then <T, U>(this ChainableEqualizer <T> chainable, Func <T, U> keySelector)
 {
     return(chainable.Then(new SelectorEqualizer <T, U>(keySelector)));
 }
 public static ChainableEqualizer <T> Then <T>(this ChainableEqualizer <T> chainable, Func <T, T, bool> equals, Func <T, int> hasher)
 {
     return(chainable.Then(new DelegatedEqualizer <T>(equals, hasher)));
 }