Esempio n. 1
0
        public PwObjectList <T> CloneShallow()
        {
            PwObjectList <T> l = new PwObjectList <T>();

            l.Add(this);
            return(l);
        }
Esempio n. 2
0
        public PwObjectList <T> CloneDeep()
        {
            PwObjectList <T> l = new PwObjectList <T>();

            foreach (T o in m_l)
            {
                l.Add(o.CloneDeep());
            }
            return(l);
        }
Esempio n. 3
0
        public PwObjectList <T> CloneShallow()
        {
            PwObjectList <T> tNew = new PwObjectList <T>();

            foreach (T po in m_vObjects)
            {
                tNew.Add(po);
            }

            return(tNew);
        }
Esempio n. 4
0
        /// <summary>
        /// Clone the current <c>PwObjectList</c>, including all
        /// stored objects (deep copy).
        /// </summary>
        /// <returns>New <c>PwObjectList</c>.</returns>
        public PwObjectList <T> CloneDeep()
        {
            PwObjectList <T> pl = new PwObjectList <T>();

            foreach (T po in m_vObjects)
            {
                pl.Add(po.CloneDeep());
            }

            return(pl);
        }
Esempio n. 5
0
        public static PwObjectList <T> FromList(List <T> tList)
        {
            if (tList == null)
            {
                throw new ArgumentNullException("tList");
            }

            PwObjectList <T> l = new PwObjectList <T>();

            l.Add(tList);
            return(l);
        }
Esempio n. 6
0
        public static PwObjectList <T> FromList(List <T> l)
        {
            if (l == null)
            {
                throw new ArgumentNullException("l");
            }

            PwObjectList <T> lNew = new PwObjectList <T>();

            lNew.Add(l);
            return(lNew);
        }
Esempio n. 7
0
        public static PwObjectList <T> FromArray(T[] tArray)
        {
            if (tArray == null)
            {
                throw new ArgumentNullException("tArray");
            }

            PwObjectList <T> l = new PwObjectList <T>();

            foreach (T t in tArray)
            {
                l.Add(t);
            }
            return(l);
        }
Esempio n. 8
0
        public static PwObjectList <T> FromArray(T[] v)
        {
            if (v == null)
            {
                throw new ArgumentNullException("v");
            }

            PwObjectList <T> l = new PwObjectList <T>();

            foreach (T o in v)
            {
                l.Add(o);
            }
            return(l);
        }