private void chain(ChainableEqualizer<T> lastEqualizer)
		{
			if (_nextEqualizer == null)
			{
				_nextEqualizer = lastEqualizer;
			}
			else
			{
				_nextEqualizer.chain(lastEqualizer);
			}
		}
		public ChainableEqualizer<T> Then(ChainableEqualizer<T> equalizer)
		{
			if (_nextEqualizer == null)
			{
				_nextEqualizer = equalizer;
			}
			else
			{
				_lastEqualizer.chain(equalizer);
			}
			_lastEqualizer = equalizer;
			return this;
		}
Пример #3
0
 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)));
 }
 public static ChainableEqualizer <T> Then <T, U>(this ChainableEqualizer <T> chainable, Func <T, U> keySelector)
 {
     return(chainable.Then(new SelectorEqualizer <T, U>(keySelector)));
 }