Exemplo n.º 1
0
        public Item(string item_text, IAttribList attributes,
                    double distance, bool is_user, bool exists)
        {
            if (AttribList == null)
            {
                AttribList = (IAttribList)attributes;
            }

            IsUser   = is_user; Exists = exists;
            ItemText = item_text; Distance = distance;
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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);
        }