コード例 #1
0
        private static int?BinarySearchLess(List <OrderDelayWrap> list, OrderDelayWrap item,
                                            Comparer <OrderDelayWrap> comparer)
        {
            var resIndex = list.BinarySearch(
                item, comparer);

            if (resIndex > 0)
            {
                return(resIndex);
            }

            resIndex = ~resIndex;

            for (int i = resIndex - 1; i >= 0; i--)
            {
                if (comparer.Compare(list[i], item) == -1)
                {
                    return(i);
                }
            }

            return(null);
        }
コード例 #2
0
 public BigDelay(int delay, OrderDelayWrap previousOrder, OrderDelayWrap order)
 {
     Delay         = delay;
     PreviousOrder = previousOrder;
     Order         = order;
 }