예제 #1
0
        public int GetIndex(DateTime datetime, int index1, int index2)
        {
            int  num4;
            long ticks = this[index1].DateTime.Ticks;
            long num2  = this[index2].DateTime.Ticks;
            long num3  = datetime.Ticks;

            if (num2 != ticks)
            {
                num4 = index1 + ((int)((index2 - index1) * ((num3 - ticks) / (num2 - ticks))));
            }
            else
            {
                num4 = (index1 + index2) / 2;
            }
            Data.Data.IDataObject obj2 = this[num4];
            if (obj2.DateTime == datetime)
            {
                return(num4);
            }
            if (((index2 - num4) < fStopRecurant) || ((num4 - index1) < fStopRecurant))
            {
                for (int i = index2; i >= index1; i--)
                {
                    obj2 = this[i];
                    if (obj2.DateTime < datetime)
                    {
                        return(i);
                    }
                }
                return(-1);
            }
            var num6 = (int)(((index2 - index1)) / fDivisor);
            int num7 = Math.Max(index1, num4 - num6);

            obj2 = this[num7];
            if (obj2.DateTime > datetime)
            {
                return(GetIndex(datetime, index1, num7));
            }
            int num8 = Math.Min(index2, num4 + num6);

            obj2 = this[num8];
            if (obj2.DateTime < datetime)
            {
                return(GetIndex(datetime, num8, index2));
            }
            return(GetIndex(datetime, num7, num8));
        }
예제 #2
0
 public bool Contains(Data.Data.IDataObject obj)
 {
     return(fList.Contains(obj));
 }
예제 #3
0
 public void Add(Data.Data.IDataObject obj)
 {
     fList.Add(obj);
 }
예제 #4
0
 public void Remove(Data.Data.IDataObject obj)
 {
     fList.Remove(obj);
 }
예제 #5
0
 public void Insert(int index, Data.Data.IDataObject obj)
 {
     fList.Insert(index, obj);
 }