Пример #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);
        }
Пример #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);
        }