Esempio n. 1
0
        public object Clone()
        {
            IAttribList TargetAttribList = new IAttribList();

            foreach (Attrib attrib in m_AttribList)
            {
                TargetAttribList.Add(attrib);
            }

            return(TargetAttribList.Count() > 0 ?
                   (IAttribList)TargetAttribList.Clone() : null);
        }
Esempio n. 2
0
        public object Clone()
        {
            Item        TargetItem       = (Item)this.MemberwiseClone();
            IAttribList TargetAttribList = new IAttribList();

            foreach (Attrib attrib in this.AttribList)
            {
                TargetAttribList.Add(attrib);
            }

            if (TargetAttribList.Count() > 0)
            {
                TargetItem.AttribList = (IAttribList)TargetAttribList.Clone();
            }

            TargetItem.IsUser   = this.IsUser; TargetItem.Exists = this.Exists;
            TargetItem.ItemText = this.ItemText; TargetItem.Distance = this.Distance;

            return(TargetItem);
        }
Esempio n. 3
0
        public object Clone()
        {
            IItemsList TargetItems = new IItemsList();

            foreach (Item item in m_ItemsList)
            {
                IAttribList TargetAttribList = new IAttribList();
                foreach (Attrib attrib in item.GetAttribList())
                {
                    TargetAttribList.Add(new Attrib(attrib.Name, attrib.Value));
                }

                if (TargetAttribList.Count() > 0)
                {
                    TargetItems.Add(new Item(item.ItemText, TargetAttribList,
                                             item.Distance, item.IsUser, item.Exists));
                }
            }

            return(TargetItems);
        }