/// <summary> /// Compares two elements to choose the best one (a > b => result > 0; a == b => result == 0; a < b => result < 0) /// </summary> /// <param name="a">First element to compare</param> /// <param name="b">Second element to compare</param> /// <param name="stopHere">Flag that indicates that the element '<paramref name="a"/>' is sufficient and scanning can be stopped</param> /// <returns>Comparison result</returns> public abstract int Compare(PoolElementWrapper <T> a, PoolElementWrapper <T> b, out bool stopHere);
public bool IsValid(PoolElementWrapper <T> container) { TurboContract.Requires(container != null, conditionString: "container != null"); throw new NotImplementedException(); }
/// <summary> /// Checks whether the element is valid and can be used for operations (always return true) /// </summary> /// <param name="container">Element wrapper</param> /// <returns>Whether the element is valid</returns> bool IPoolElementOperationSource <T> .IsValid(PoolElementWrapper <T> container) { return(true); }
/// <summary> /// Compares two elements to choose the best one (a > b => result > 0; a == b => result == 0; a < b => result < 0) /// </summary> /// <param name="a">First element to compare</param> /// <param name="b">Second element to compare</param> /// <param name="stopHere">Flag that indicates that the element '<paramref name="a"/>' is sufficient and scanning can be stopped</param> /// <returns>Comparison result</returns> public override int Compare(PoolElementWrapper <T> a, PoolElementWrapper <T> b, out bool stopHere) { stopHere = false; return(_comparer.Compare(a.Element, b.Element)); }
public bool IsValid(PoolElementWrapper <T> container) { Contract.Requires(container != null); throw new NotImplementedException(); }