예제 #1
0
        private int FindSellOrderIndex(string orderId, int cookie)
        {
            int index = -1;

            if (!orderId.Equals(""))        // поиск только по orderId
            {
                index = SellOrders.FindIndex(x => x.OrderId.Equals(orderId));
                return(index);
            }
            else
            {
                index = SellOrders.FindIndex(x => x.OrderId.Equals(orderId));
                if (index == -1 || orderId.Equals(""))
                {
                    index = -1;
                }
                if (index != -1)
                {
                    return(index);
                }
                index = SellOrders.FindIndex(x => x.Cookie == cookie);
            }
            return(index);
        }