/// <summary>
 /// Compares two elements to choose the best one (a &gt; b =&gt; result &gt; 0; a == b =&gt; result == 0; a &lt; b =&gt; result &lt; 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();
        }
示例#3
0
 /// <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 &gt; b =&gt; result &gt; 0; a == b =&gt; result == 0; a &lt; b =&gt; result &lt; 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));
 }
示例#5
0
        public bool IsValid(PoolElementWrapper <T> container)
        {
            Contract.Requires(container != null);

            throw new NotImplementedException();
        }