Example #1
0
 public void AddRange(ListBase <T> list)
 {
     if (list != null)
     {
         foreach (T local in list)
         {
             base.Add(local);
         }
     }
 }
Example #2
0
        public virtual TList <T> Copy()
        {
            TList <T> list = new TList <T>();

            foreach (T local in Items)
            {
                T item = (T)ListBase <T> .MakeCopyOf(local);

                list.Add(item);
            }
            return(list);
        }
Example #3
0
        public virtual void CopyTo(TList <T> copyTo)
        {
            ArrayList list = new ArrayList();

            foreach (T local in copyTo)
            {
                list.Add(local.ToString());
            }
            foreach (T local in Items)
            {
                T item = (T)ListBase <T> .MakeCopyOf(local);

                if (list.IndexOf(item.ToString()) < 0)
                {
                    copyTo.Add(item);
                }
            }
        }
Example #4
0
        public ListBase <T> FindAll(Predicate <T> match)
        {
            if (match == null)
            {
                throw new ArgumentNullException("match");
            }
            ListBase <T> base2 = this.Clone() as ListBase <T>;

            base2.ClearItems();
            foreach (T local in base.Items)
            {
                if (match(local))
                {
                    base2.Add(local);
                }
            }
            return(base2);
        }
Example #5
0
 public static bool IsNullOrEmpty(ListBase <T> list)
 {
     return((list == null) || (list.Count == 0));
 }