Esempio n. 1
0
        public object Clone()
        {
            IAttributeList TargetAttributeList = new IAttributeList();

            foreach (Attribute attribute in AttributeList)
            {
                TargetAttributeList.Add(attribute);
            }

            return(TargetAttributeList.Count() > 0 ?
                   (IAttributeList)TargetAttributeList.Clone() : null);
        }
Esempio n. 2
0
        public object Clone()
        {
            IItemsList TargetItems = new IItemsList();

            foreach (Item item in ItemsList)
            {
                IAttributeList TargetAttributeList = new IAttributeList();
                foreach (Attribute attrib in item.GetAttributeList())
                {
                    TargetAttributeList.Add(new Attribute(attrib.Name, attrib.Value));
                }

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

            return(TargetItems);
        }
Esempio n. 3
0
        public object Clone()
        {
            Item           TargetItem          = (Item)this.MemberwiseClone();
            IAttributeList TargetAttributeList = new IAttributeList();

            foreach (Attribute attribute in this.AttributeList)
            {
                TargetAttributeList.Add(attribute);
            }

            if (TargetAttributeList.Count() > 0)
            {
                TargetItem.AttributeList = (IAttributeList)TargetAttributeList.Clone();
            }

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

            return(TargetItem);
        }